Why are my public ID's invalid?

Options
cooldude
cooldude Member Posts: 1

I am using the JavaScript Cloudinary API to upload images and store them on the cloud.

Sometimes, I will get an error for having an invalid public_id. Here is an error I recently received -

{

 message: 'public_id ( The Unforgettable Journey10_0) is invalid',

 name: 'Error',

 http_code: 400

}


Another error -


{

 message: 'public_id ( The Junk Food Journey9_0) is invalid',

 name: 'Error',

 http_code: 400

}


Why are these public ID's invalid? I am creating the ID's programatically so I will adjust my code as needed.

Tagged:

Answers

  • Tamara
    Tamara Member, Cloudinary Staff Posts: 100
    Options

    Hi there,

    I've noticed that these public IDs appear to begin with a whitespace (as indicated by the error). 

    Please keep in mind our naming conventions for public IDs, which are outlined here: Link to Permitted Naming Conventions.

    Best regards,

    Tamara