I want to add a custom path when it uploads(Image) to the digital ocean spaces using strapi-v4
bhargav2204 opened this issue · 1 comments
please provide solution for this -
I'm looking to modify a provider that I have not installed strapi-provider-upload-google-cloud-storage because I used Digital ocean spaces. I want to add a custom path when it uploads to the digital ocean spaces using strapi-v4. Currently its saving in the main bucket but multiple files/folders are saved at the root of the digital ocean spaces. I want to add a custom ‘path’ when saving the files to the bucket.
CDN
DIgital Ocean spaces
can I give a custom path either way ?
Hi @bhargav2204,
If you are using the REST API of Strapi to upload media, it's possible to have custom path by adding folder configuration in option.
In the upload form, you have many args :
field
files
path
ref
refId
In the path
option, define where the file need to be upload, by example :
path : `my-folder/my-custom-{$id}/`
But, i think it's not possible for now to upload file with custom path from the Strapi Dashboard.
Thanks,