Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not integrate Lock Objects S3 with Supabase #423

Closed
2 tasks done
FeliisraCeleri opened this issue Jan 18, 2024 · 3 comments
Closed
2 tasks done

Can not integrate Lock Objects S3 with Supabase #423

FeliisraCeleri opened this issue Jan 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@FeliisraCeleri
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I am using S3 integrated with supabase to save my files. I want to configure Lock Objects in my S3 Bucket, but i fails when try to save files via Supabase SDK.

I have this error message:

{"error":{"raw":"{\"name\":\"Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters\",\"httpStatusCode\":400,\"userStatusCode\":400,\"originalError\":{\"name\":\"InvalidRequest\",\"$fault\":\"client\",\"$metadata\":{\"httpStatusCode\":400,\"requestId\":\"KQ7VK13MMPSQH89E\",\"extendedRequestId\":\"fWidPboCY3akHUhFakfzno/A7zsV40ek6f2dNka+wRB02WC/F2NiuAJTD2PU71tQDCfSGpSum0A=\",\"attempts\":1,\"totalRetryDelay\":0},\"Code\":\"InvalidRequest\",\"RequestId\":\"KQ7VK13MMPSQH89E\",\"HostId\":\"fWidPboCY3akHUhFakfzno/A7zsV40ek6f2dNka+wRB02WC/F2NiuAJTD2PU71tQDCfSGpSum0A=\",\"message\":\"Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters\"}}","name":"Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters","message":"InvalidRequest","stack":"Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters: InvalidRequest\n    at StorageBackendError.fromError (/app/dist/storage/errors.js:46:16)\n    at S3Backend.uploadObject (/app/dist/storage/backend/s3.js:113:48)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Uploader.upload (/app/dist/storage/uploader.js:55:36)\n    at async ObjectStorage.uploadNewObject (/app/dist/storage/object.js:30:35)\n    at async Object.<anonymous> (/app/dist/http/routes/object/createObject.js:42:46)"},"msg":"celeri-qa | POST | 400 | 10.241.2.76 | req-1 | /object/CELERI_AR/7f2e93a4-d7fb-44ff-a2b6-1d5e6e240d35_core-front_git_flow.png | undici"}

Something similar to this issue --> aws/aws-sdk-php#1694

To Reproduce

Try to integrate S3 Lock Objects with Supabase and save a file.

Expected behavior

I have Lock Objects configurated in S3 and still can save files via Supabase.

Screenshots

image

You can add here the header that is missing from Lock Objects S3 integration.

@FeliisraCeleri FeliisraCeleri added the bug Something isn't working label Jan 18, 2024
@fenos fenos added enhancement New feature or request and removed bug Something isn't working labels Jan 18, 2024
@fenos
Copy link
Contributor

fenos commented Jan 18, 2024

@FeliisraCeleri uploading files with LockObjects is not currently supported in Supabase Storage

It is not something on the roadmap at the moment, however, feel free to draft a PR if you'd like

@fenos
Copy link
Contributor

fenos commented Jan 18, 2024

The reason this doesn't work out of the box is because the server will need to compute the checksum of the file before uploading. This means that the file needs to be saved on disk first, to be able to compute the checksum, then uploaded to S3, currently, the upload is streamed directly to S3

@fenos
Copy link
Contributor

fenos commented Apr 17, 2024

Closing this, as this feature is not on our current radar

@fenos fenos closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants