- Strapi Version: “3.6.10”,
- Operating System: Windows
- Database: postgres
- Node Version: “^14.0.0”,
- NPM Version: “^6.0.0”
I recently set Strapi to upload any media files straight to Google Cloud storage, the issue is that each media file uploaded has a folder created for it as well, so if I upload an image called test.png, the path will be images/test/test.png, it should not create a folder called test, it should just put the file into the basepath specified which is set to images/.
I had a look at the strapi-provider-upload-google-cloud-storage folder in node modules and found the lib/provider.js file which was creating the file path. Inside of this, I removed the filePath variable from the generateUploadFileName function, and that solved the issue in my development environment.
Images upload straight into the Google bucket with just the basePath and file name so images/test.png.
So I then used Google Cloud Shell to update my live Strapi environment with this change, but on testing the media upload function, the previous issue remains, it is like it has not updated with my new changes.
I followed the steps in this guide to get the Google media uploader working:
That npm package has been moved to this area but the steps do not work for this so I have used the previous guide and package.
Am I missing something? Any help would be much appreciated. Thank you!