Skip to content

Update S3 upload to validate file size and use POST #385

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

Merged
merged 5 commits into from
Feb 28, 2025

Conversation

infomiho
Copy link
Collaborator

It uses the createPresignedPost to create an upload URL which can have limit the file upload file. It sets the content-length-range to be of maximum MAX_FILE_SIZE_BYTES which is the same value we use on the client.

Copy link
Collaborator

@sodic sodic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
I'm assuming you tested it (I didn't).

@infomiho
Copy link
Collaborator Author

I've tested it 👍

We should update the same docs as you did, after we merge #384

@@ -105,8 +105,6 @@ Now we need to change some permissions on the bucket to allow for file uploads f
}
]
```
As an example, here are the CORS permissions for this site - https://opensaas.sh:
<Image src={corsExample} alt="cors-example" loading="lazy" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sodic I've deleted this image since it's just repeating what the code block says and it's easier so we don't have to retake screenshots every time we update the code block

@infomiho infomiho merged commit d088cff into main Feb 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants