Upload encrypted PDF via UI

Hi community,

how do I upload an encrypted PDF into the media library? Via UI, not via API.

I tried to upload it in the regular way, but it failed. So I understood from manual that cloudinary needs to handle it as a RAW file. But in UI there seems to be no option to declare an upload as RAW, if it is a known format like PDF.

Thanks for your comments!


  • Tom
    Tom Member, Cloudinary Staff Cloudinary Staff

    Hi @razenmemo ,

    Thanks for reaching out.

    By default, when uploading PDFs they will be assigned ResourceType "Image" as they can be manipulated using the same transformation as images.

    However, due to the password or encryption, Cloudinary cannot open and modify the file and upload it as raw using the Media Library UI is unavailable.

    All uploads from the media library currently use the 'auto' resource type and are sorted automatically when the upload completes and the file is analyzed. There is an open feature request about this, but in the short term, to force changing the resource_type value so that a file can be uploaded if it can't be opened for validation, the upload must come from the API.

    As an alternative, you can also use the Upload Widget to help you with encrypted PDF uploading (i.e. you can refer to this link to try it out: https://jsfiddle.net/ecpdev/hqnx91Lo/36/), and this may require some coding if you need to do regular uploading of this type of file.

    Another method you could use is the command-line interface tool that could help you to upload your file by using:

    cld uploader upload encryptedfile.pdf -o resource_type raw

    Hope this helps, please let me know if you have any further questions.

    Kind Regards,