Combining the FilePicker & GCS file upload

I meant to write this up when I noticed the documentation was off. My working solution uses a JS query to trigger the GCP upload.
I send up the filename that I want to set (I use a slug and other info to rename it for our use).
I thn use filepicker.file.data to set for GCP to upload data. The docs read to use filepicker.file, which didn’t work for me.

So in the GCP script:
Upload file name is the file name I am setting for that file in the bucket
upload data is the filepicker.file.data stream.

I hope that is clear if not perhaps I can clarify more

One bug which still remains is the “Export file type” field. It doesn’t quite work as expected and limits the Content-Type values which can be set on the file. The conversation is here: Oh CORS 😕, GCS and cors issue by Export File Type