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

Very large uploads fail #1051

Open
richard-to opened this issue Oct 24, 2024 · 1 comment
Open

Very large uploads fail #1051

richard-to opened this issue Oct 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@richard-to
Copy link
Collaborator

If someone tries to upload a very large file, say 400MB, then the uploader will fail during proto serialization. This is because the file will exceed the maximum array length in Javascript which is 2^32 - 1 (4,294,967,295).

Currently best alternative is to use a Fast API endpoint to handle the upload and probably a custom web component to handle the upload to the Fast API endpoint.

In terms of fixes for this, could it be possible to implement some kind of chunked upload to handler larger file sizes? Or could there be a way to avoid using protos in this case? Or could there be another way to workaround the maximum array length issue here?

@richard-to richard-to added the bug Something isn't working label Oct 24, 2024
@wwwillchen
Copy link
Collaborator

I think avoiding protos and having a separate route handler would make sense (to avoid the overhead & limitations of protos), but tbh I find this to be a somewhat niche use case.

for example, could they instead have the user upload directly to a file storage service like GCS: https://cloud.google.com/storage/docs/xml-api/post-object-forms?

once you go down the route of large file uploads, then it opens the door to things like resumable uploads, etc.

I think the current suggestion of using FastAPI (or whatever framework) w/ web component SGTM. For example, if a user is uploading something that large, they will probably want some kind of progress indicator (e.g. 30% uploaded).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants