jakeFeldman / strapi-provider-upload-azure-storage

Strapi Provider Upload Azure Storage
MIT License
75 stars 42 forks source link

Add cache control setting #74

Closed fl034 closed 1 year ago

fl034 commented 1 year ago

I wanted to add the cache-control header to my uploaded files to improve caching on my clients.

I used the field from the documentation here: https://learn.microsoft.com/de-de/javascript/api/@azure/storage-blob/blobhttpheaders?view=azure-node-latest#@azure-storage-blob-blobhttpheaders-blobcachecontrol

Since I'm new to TypeScript, please check my PR thoroughly 😄

jakeFeldman commented 1 year ago

I've published a beta version yarn add strapi-provider-upload-azure-storage@beta Please let me know if you have any issues with this. If not, I will publish a full version in a few days.

fl034 commented 1 year ago

@jakeFeldman thank you very much. Tested successfully with a missing defaultCacheControl in plugin.js, then with the field present but a missing entry in the .env file. And then with a value that then appeared correctly in the response headers. All good :)

jakeFeldman commented 1 year ago

Great to hear. I will publish a full version later today. Sorry for the delay.