Problem/Motivation
When uploading a PDF file using the Cloudinary module, the generated URL misses the .pdf extension. Consequently, when users click on the generated link, the file downloads without an extension instead of opening in a browser tab for viewing.
Steps to reproduce
- Install the Cloudinary module on a Drupal site.
- Configure the module with appropriate Cloudinary credentials.
- Upload a PDF file via the Cloudinary interface.
- Observe the generated URL for the uploaded PDF file.
Proposed resolution
Modify the Cloudinary module to ensure the .pdf extension is included in the generated URL for PDF files. This can be done by appending the file extension to the URL if it's missing.
Remaining tasks
- Update the module code to include the .pdf extension in the URL.
- Test the updated module to ensure the issue is resolved.
- Review and merge the code changes.
User interface changes
None expected.
API changes
None expected.
Data model changes
None expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | cloudinary-506472d-fix-the-stream-wrapper-undefined-URI-and-set-the-correct-asset-type-plus-the-extension.patch | 1.58 KB | bonrita |
Comments
Comment #2
bonrita commentedThe patch works but may need an extra touch. This was a quick fix.