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

Allow uploads of files bigger than 2GiB #484

Merged
merged 9 commits into from
Nov 21, 2023
Merged

Conversation

kashalls
Copy link
Contributor

@kashalls kashalls commented Nov 9, 2023

This PR corrects the use of Int in prisma to be used as BigInt. This PR creates the needed migration (pretty much as @the-P1neapple states in #459).

This PR also corrects the types and introduces what I would call required jank in index.ts. This is a similar approach to what Prisma recommends developer do when working with BigInt's: https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields#serializing-bigint

The only problem is that next doesn't know how to deal with these BigInt's too so I resorted to that jank.

I tested this with my own image (ghcr.io/kashalls/zipline:trunk-3.7.5-test.2) and was able to verify a iso upload of 3GiB would go through. I have not been able to test larger files as I lack the memory it requires to store and combine these files at the same time. (When uploading it stores it in memory unless you have a tmp folder override, it also needs to combine these chunks into the end file which essentially means: File Size x 2 = Memory Requirement?) Idk its late and I don't know why i decided to do this now.

This fixes #459.

@github-actions github-actions bot added this to the 3.7.1 milestone Nov 9, 2023
@diced
Copy link
Owner

diced commented Nov 21, 2023

@kashalls update branch to upstream

@kashalls
Copy link
Contributor Author

@kashalls update branch to upstream

👍🎉

@diced diced merged commit 1f61c56 into diced:trunk Nov 21, 2023
1 check 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.

Bug: Upload file with size larger than 2 GB crashes the app after chunk processing was finished
3 participants