Modify upload provider with custom path

Hello @mkirkland !

Sorry for the delay, hope my answer will help you !

The provider strapi-provider-upload-google-cloud-storage (than I maintain) can be use with custom path.

When you upload a file, you just need to set path.

Please find an example with a formData :

    const formData = new FormData();
    formData.append('ref', 'component');
    formData.append('refId', this.id);
    formData.append('field', field);
    formData.append('path', `my/custom/path/`);

Also, I’ve add an option call basePath than allow you do set a default folder to upload all of your files into (GitHub - Lith/strapi-provider-upload-google-cloud-storage: Google Cloud Storage Upload Provider for Strapi)

Thanks

4 Likes