Allow uploads of files bigger than 2GiB #484
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-bigintThe 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.