shorwood / strapi-provider-upload-do

Strapi Upload Provider for Digital Ocean Spaces. This provider will upload to the space using the AWS S3 API.
MIT License
59 stars 32 forks source link

Fix CDN convert using URI.js #5

Closed maxep closed 3 years ago

maxep commented 3 years ago

Provide a more robust URI conversion when using CDN.

For some mime (like audio) the Location format differs, and so the URL conversion using data.Location.replace fails. By using URI.js, we can easily enforce the URL to the following format: https//<config.cdn>/<object.key>

pturner1989 commented 3 years ago

@maxep Thank you, this issue was driving me mad. Currently using #5 in my project.

amantiwari1 commented 3 years ago

hey, @pturner1989 there is no mention about set private or public optional!! - I mean how do I do that? is it even possible?

shorwood commented 3 years ago

Just checked that out and it's a great contribution ! Sorry for the delay, better late than never, i'll merge in. ;)

amantiwari1 commented 3 years ago

@shorwood help!, there is no mention about set private or public optional!! - I mean how do I do that? is it even possible?

maxep commented 3 years ago

@amantiwari1 currently no. Uploads are public-read, see index.js#L65. That's the same behavior as the official aws-s3 strapi plugin.