Media Upload into Google Cloud Storage Issue

[details=“System Information”]

  • Strapi Version: “3.6.10”,
  • Operating System: Windows
  • Database: postgres
  • Node Version: “^14.0.0”,
  • NPM Version: “^6.0.0”

Hello,

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!

My solution was to upgrade Strapi from v3 to v4, then opt to use Amazon S3 instead of Google or Cloudinary, Google Storage is good but I did not want to try that due to the previous hassle I went through albeit it was my fault, and cloudinary I am not a fan of that, it seemed good at first but later I did not like it at all.