Skip to content

extractPublicId function returns an encoded public id #47

Open

Description

@AlexPagnotta

Hello,

I noticed a weird behaviour when using the extractPublicId function, let's say we upload a file named TestÀ.png, we would get an url like this, with the special character encoded:

https://res.cloudinary.com/XXXXXX/image/upload/photos/TestA%C3%8C_XXXXX.png

Now if I check the public id in cloudinary I have photos/TestAÌ_XXXXX while with the extractPublicId function I get photos/TestA%C3%8C_XXXXX, so it's still encoded and different from the correct one.

This is not a big deal since I can decode the public ID pretty easily after I get it, but I was asking myself if it makes sense to include the decoding directly into the extract function, or if there is any downside on doing that.

Activity

  1. changed the title [-]extractPublicId function return an encoded public id[/-] [+]extractPublicId function returns an encoded public id[/+] on Apr 17, 2023
  2. mayashavin commented on May 9, 2023

    @mayashavin
    Owner

    @AlexPagnotta I'm not sure we should include the decode process in the extractPublicID. Unless we test enough the regular cases when including the decoding inside extract function. Maybe you are interested in contributing for that?

    Maybe add another function to decode and have it included as part of the package's functionalities?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions