fix(richdocuments): Use filename from DownloadAs postmessage for correct file extension#16623
Conversation
|
|
||
| else -> { | ||
| val downloadFileName = downloadJson.optString(FILENAME, fileName) | ||
| downloadFile(url, downloadFileName) |
There was a problem hiding this comment.
Hi, thank you for the PR.
I have a quick question regarding the fileName handling. Is the fileName always incorrect, or is it only missing the extension in some cases? Also, can we confirm whether downloadJson.optString(FILENAME, fileName) consistently returns valid data?
Could you please share the steps to reproduce the issue and how you tested this? That would help us better understand the scenario and verify the behavior on our side.
There was a problem hiding this comment.
Hi,
fileName extension is incorrect when using "Download as" button to download file into different format. In Collabora Online side, I added CollaboraOnline/online#14344 filename property to the DownloadAs postmessage JSON which will filename with correct extension.
Steps to reproduce:
- Open writer document
- Hamburger Menu > Download as -> rtf
- File will have wrong extension on download
…ect file extension Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
18b0381 to
9e0e1c6
Compare
There was a problem hiding this comment.
Tested working, thank you.
However fallback fileName been used thus while downloading title ends with original file extension (e.g. my_doc.odt) and also downloaded file ends with original extension + wanted extension e.g (my_doc.odt.rtf)
Related part:
val downloadFileName = downloadJson.optString(FILENAME, fileName)
but we can handle these things in different PR.
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
🖼️ Screenshots
🏁 Checklist