Why do I get a "public ID too long" error when trying to fetch from a remote URL?

When using 'fetch', the origin image's URL used as the public ID of the new resource.
The length of a resource public-id is limited to 256 characters (This can be extended in certain cases), therefore when trying to fetch URLs which are longer than this limit, it will fail.

For such very long URLs, you can use our API to upload it from its remote location or set up an upload-mapping from it's origin.


Have more questions? Submit a request


  • Avatar
    Origami Support

    Would it be possible to use a randomly generated ID instead of relying on the URL? You offer this when using the upload api.

  • Avatar
    Nadav Ofir

    Dynamically specifying public IDs is only available with explicit uploading approaches (i.e. with the upload API), but not with 'fetch' - that's because the URL used to access the image is the same one that tells Cloudinary where to grab it from. You may want to consider switching to upload-mapping (original name is being preserved) or regular uploading (complete flexibility)

    Edited by Nadav Ofir
Powered by Zendesk