eliataylor / object-actions

An interactive worksheet and CMS builder
Other
0 stars 3 forks source link

Add support for "cloud-file" field_type #19

Open eliataylor opened 1 week ago

eliataylor commented 1 week ago

Starting from infer_field_datatype add a condition for "remote-image" which expects a cloud storage file path or reference.

In the users project add a path for:

  path('api/generate-iam-token/', generate_iam_credentials, name='api_generate_iam_token'),

In ReactJS, build a component that can generate a new api if needed, and POST directly to cloud storage: https://www.googleapis.com/upload/storage/v1/b/YOUR_BUCKET_NAME/o?uploadType=media&name=${selectedFile.name};

More docs are here: https://cloud.google.com/storage/docs/samples/storage-generate-upload-signed-url-v4 and https://cloud.google.com/storage/docs/xml-api/post-object-multipart

Other endpoints that process bucket file references, should validate existence / access / ownership.

eliataylor commented 1 week ago

provide Cloud Bucket access (world-writable)