Skip to content

Mobile uploads: names of files are not saved not correctly in non-latin alphabet (Russian, Arabic, Chinese) #2160

Closed

Description

@lelvisl

This works only for photos. When i uploading file from mobile - i see
IMAGE 2020-06-02 9:10:28 PM
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?

Activity

  1. djorkaeffalexandre commented on Jun 5, 2020

    @djorkaeffalexandre
    Contributor

    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.

  2. imrishabh18 commented on Sep 19, 2020

    @imrishabh18
    Contributor

    @djorkaeffalexandre Is this resolved yet? If not can I get some directions on how to resolve this thing.

  3. billypon commented on Oct 22, 2020

    @billypon

    @imrishabh18

    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.

  4. billypon commented on Oct 22, 2020

    @billypon

    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'

  5. djorkaeffalexandre commented on Nov 20, 2020

    @djorkaeffalexandre
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions