strapi
strapi copied to clipboard
Admin preview images are by default postfixed with a cacheRef to disable browser cache
Bug report
Describe the bug
Uploaded images in the Amin are postfixed with a cacheRef value to disable browser cache.
At the moment there is no option to enable / disable this postfix from the Media Library settings, however, in the code there is (sometimes) a property available (but this one is always set to true).
I would like to load my images using a CDN (CloudFront) but this postfix makes my signed-urls invalid. Therefore i'm unable to display them properly.
Steps to reproduce the behavior
- Sign urls with CloudFront in the File-model lifecycle(s)
- Go to Media Libary and try to preview the image
- The preview image won't be displayed
Expected behavior
When the fileCache is disabled (if possible) then it should display the preview image correctly.
Screenshots
Code snippets
https://github.com/strapi/strapi/blob/81a9a63cad7ebbf06210c0da33d9c7dd1082a9e1/packages/strapi-plugin-upload/admin/src/components/EditForm/index.js#L64 https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-upload/admin/src/components/CardPreview/index.js#L40
System
- Node.js version: v14.16.0
- NPM version: 6.14.11
- Strapi version: 3.5.3
- Database: Mysql
- Operating system: MacOS
Additional context
If we could make the file-cache configurable in the Media Library > Setting then we can apply this setting in the necessary components. I can't access my files directly in S3 due to company restrictions so I always need to use the CDN to fetch them.
Strapi version: 3.5.3
Can you please test on the latest release, v3.6.1
@derrickmehaffy I tested with v.3.6.2 but this does not make a difference
Hello!
As we have not received any new or updated information to reproduce this issue in the last 14 days we are marking this issue as closed. Should you have new information please feel free to respond and we will consider reopening it.
If anyone else have updated information for this issue, please open up a new bug report and simply reference this closed bug report so that we can get any new information you may have. If you have questions please refer to the contributor's guide on opening issues.
Thank you and have a great day!