2

I am trying to upload a file to GCS using javascript.

I found this answer which shows how to upload and see the progress of that file.

I also followed the official documentation

All of the above worked for me, but now i want to allow anyone who visits my website to upload to the bucket i have. I don't want to authenticate using the button that the documentation shows. I just want anyone to be able to visit the website, upload and see the progress of the upload file.

The main issue i have is that i want users to be able to see the PROGRESS of the upload file. Maybe there is another way.

Thanks

Liam
  • 27,717
  • 28
  • 128
  • 190
Nicolae
  • 86
  • 6
  • Does this answer your question? [Upload file to google cloud storage with NodeJS](https://stackoverflow.com/questions/48919153/upload-file-to-google-cloud-storage-with-nodejs) – Liam Oct 05 '22 at 14:02

1 Answers1

0

To make it work you need to:

  1. Configure Cross Origin Resource Sharing (CORS)
  2. Generate signed url for file upload. You can check example in python how to do it or example server side app in node.js
  3. Use resumable multiple chunks upload to show upload progress.
Pawel Czuczwara
  • 1,442
  • 9
  • 20