This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

File type is missing in the URL for raw files

Comments

3 comments

  • Avatar
    Eric Pasos

    Hi Gowtham,

    The format is dependent on the extension of the file being uploaded to your Media Library account. For example:

    cloudinary.uploader.upload("https://res.cloudinary.com/dnjnqvjbi/raw/upload/v1658357176/6bf8544f-ac67-4353-98fe-318b4e798354-CV_1658357175698", public_id="6bf8544f-ac67-4353-98fe-318b4e798354-CV_1658357175698", resource_type="raw")
    In the case that you want to provide this information, you can add the filename extension or you may use the `format` parameter, and this value will become the extension of the asset filename. For example:
     
    cloudinary.uploader.upload("https://res.cloudinary.com/dnjnqvjbi/raw/upload/v1658357176/6bf8544f-ac67-4353-98fe-318b4e798354-CV_1658357175698", format="docx", public_id="6bf8544f-ac67-4353-98fe-318b4e798354-CV_1658357175698", resource_type="raw")
    Hope this helps. Please let me know if you have any further questions.
     

     

    0
    Comment actions Permalink
  • Avatar
    Gowtham Ravichandran

    Hey Eric,

    Thanks for your quick response.

    I tried setting the format option in the URL. When I use the format option, the filename is stored in the Cloudinary as <example>.docx.docx and if I remove the format, the filename is stored as <example>.

    I am passing the file with the extension. Could you please help?

    Thanks in adavnce!

    0
    Comment actions Permalink
  • Avatar
    Eric Pasos

    Hi Gowtham,

    It is also possible to provide the extension of the file without using the parameter format, for example:

    cloudinary.uploader.upload("c:\samplefile.doc", public_id="samplepublicid", resource_type="raw")

    But just to check further, could you please help to provide a sample upload code that you used and also a sample *.docx file that has this duplicated extension?

    0
    Comment actions Permalink

Post is closed for comments.