File extensions disappear other than image and pdf files?

medicasimple Member Posts: 1
edited June 2023 in Developer APIs

Hi there all of you guys.

I am trying to upload some files to cloudinary but other than pdf files, extensions disappear and I can not download properly these files.

I am using "resource_type:auto" and also "resource_type:raw" parameters but it didn't help me.

I am sure that files are properly stored because change its name and add its extensions by hand give me the original file correctly.

I also tried to use "format" parameter but for instance .xlsx or .html files does not seen under upload_result - format parameter.

I hope I can explain myself correctly. I added some screenshots too.

Thank you for helping me



  • Tom
    Tom Member, Cloudinary Staff Posts: 65

    Hi @medicasimple ,

    Thanks for reaching out.

    Yes, so when the resource_type of your asset is either image or video, the extension is not saved as part of the public_id as we know this is image/video.

    However, with raw files, the extension can be anything so include the extension in the public_id.

    Note: pdf's are automatically uploaded as resource_type image but you can specify this as raw if you would like to save it as raw resource_type.

    You should still be able to download images without an extension on image/video where when no extension is specified we will use the original format e.g. can be viewed/downloaded as

    If you are downloading via browser without the extension then it should automatically add the extension but when downloading via terminal (using wget), extension is not saved so you can copy the delivery URL from the UI/APIs as it will include the extension.

    Please let me know if you have any other questions or queries.

    Kind Regards,