You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mobile uploads: names of files are not saved not correctly in non-latin alphabet (Russian, Arabic, Chinese) #2160
This works only for photos. When i uploading file from mobile - i see
And with photos, when i watch preview - i see filename correctly. But on download - photo's file name is lost.
I don't think that this is correct behaviour.
On desktop app i can upload any file with non-latin alphabet. May be you should use algorithm from desktop app?
Hey guys! I think an encodeURI should resolve our issue.
If someone of you can give a try, feel free to open a pull request.
I'll try to take a look ASAP, if nobody take this.
Thanks.
The filename was encoded, and had been saved to db, I think the simply way is decode the file name when the loadHistory API is calling, or do decode on both app and web client.
View template on app is Rocket.Chat.ReactNative/app/views/MessagesView/index.js, and on web is Rocket.Chat/app/message-attachments/client/messageAttachment.html.
I want to drop the bad PR(#2020), I decode filename in sendFileMessage Meteor method, so that I can solve this issue temporary without compile app. Because I don't need the 'special chars'
And with photos, when i watch preview - i see filename correctly. But on download - photo's file name is lost.
I don't think that this is correct behaviour.
@lelvisl We're generating a new filename to each image before save it to the device, your suggestion is about use the original filename?
If yes, can you create a new issue? Each GH issue should refer to a specific problem.
Thanks.
Activity
djorkaeffalexandre commentedon Jun 5, 2020
Hey guys! I think an
encodeURIshould resolve our issue.If someone of you can give a try, feel free to open a pull request.
I'll try to take a look ASAP, if nobody take this.
Thanks.
imrishabh18 commentedon Sep 19, 2020
@djorkaeffalexandre Is this resolved yet? If not can I get some directions on how to resolve this thing.
billypon commentedon Oct 22, 2020
@imrishabh18
The filename was encoded, and had been saved to db, I think the simply way is decode the file name when the
loadHistoryAPI is calling, or do decode on both app and web client.View template on app is
Rocket.Chat.ReactNative/app/views/MessagesView/index.js, and on web isRocket.Chat/app/message-attachments/client/messageAttachment.html.billypon commentedon Oct 22, 2020
I want to drop the bad PR(#2020), I decode filename in
sendFileMessageMeteor method, so that I can solve this issue temporary without compile app. Because I don't need the 'special chars'djorkaeffalexandre commentedon Nov 20, 2020
@lelvisl We're generating a new filename to each image before save it to the device, your suggestion is about use the original filename?
If yes, can you create a new issue? Each GH issue should refer to a specific problem.
Thanks.