When assets are uploaded with the 'image' or 'video' resource types, Cloudinary automatically detects the type of file and sets the 'format' property of the asset based on that detection.
In some cases, PDF files are detected as being AI files or vice versa, and this typically happens when the file is created by the Adobe Illustrator application. For most affected assets, the file contains metadata values added by Illustrator which cause our detection to identify the asset as an Illustrator file.
There are several options to work around this, depending on how you're using the asset:
- Allow the format property and delivery URL extension to be set as .ai when uploading, and then add a .pdf extension to the delivery URL when delivering the file. The file is not transformed in this case, and you'll receive the original file with no modifications.
- Use an Incoming Transformation to set the format to PDF explicitly as part of the upload call (you can do also this in an Upload Preset if you're not using the API / SDK for your uploads)
- Upload the asset as the 'raw' resource type so no format detection will be performed, but please note this will also prevent the use of the asset with transformations.
- For customers on a paid plan, we can change a configuration option for your product environment to force the .PDF extension for these files. When this option is enabled and an uploaded asset is detected as PDF or AI, we'll use the PDF/AI file extension provided at upload time instead of the detected format.
If you'd like us to change the account configuration for your product environment(s), please send a support request via this support site and include your account details in the request.
Comments
0 comments
Please sign in to leave a comment.