Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chat): add download link to attachments #13618

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Oct 23, 2024

☑️ Resolves

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

image

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
Copy link
Contributor Author

ShGKme commented Oct 23, 2024

/backport to stable30

Comment on lines +111 to +116
<NcActionLink :href="linkToFile">
<template #icon>
<File :size="20" />
</template>
{{ t('spreed', 'Go to file') }}
</NcActionLink>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't supposed to be shown for guests, no 🤔 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is wasn't shown, but I don't think it wasn't supposed to. It was a bug.

There was no link in the menu, but the preview itself is a link anyway.

Copy link
Contributor

@Antreesy Antreesy Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shared files in public rooms are public shares, so should be correct here to have access for guests:

  • as user: https://nextcloud.local/index.php/f/585
  • as guest: https://nextcloud.local/index.php/s/A4ERJc3xMKmN88o

Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, tested from my side

Comment on lines +463 to +468
const uid = getCurrentUser()?.uid
if (!uid) {
const fileid = this.linkToFile.slice(this.linkToFile.lastIndexOf('/') + 1)
return this.messageFile.link + '/download/' + encodeURI(fileid)
}
return davRemoteURL + '/files/' + encodeURI(uid) + '/' + encodeURI(this.messageFile.path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we'll move it to utils/fileDownload.ts? Feels like a fit to keep reusable logic there

Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Direct File Download in Nextcloud Talk on Desktop
3 participants