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

Add support for large files (>2 GB) #57

Closed
iver56 opened this issue Jun 25, 2021 · 7 comments
Closed

Add support for large files (>2 GB) #57

iver56 opened this issue Jun 25, 2021 · 7 comments

Comments

@iver56
Copy link
Contributor

iver56 commented Jun 25, 2021

offset and total_size in bytes are currently represented by int32 fields in the database:

offset = models.IntegerField(default=0)

This effectively limits the max file size to roughly 2 GB.

In my use case, django-drf-filepond sometimes needs to be able to swallow/accept large files. It would be nice if django-drf-filepond could use BigIntegerField (64 bits) instead of IntegerField (32 bits).

@jcohen02
Copy link
Collaborator

Thanks for highlighting this @iver56. Happy to make the switch to BigIntegerField for both offset and total_size.

I'll leave last_chunk as an IntegerField since I can't really see a case where you'd need to have 2^32 chunks, you'd presumably hit other limitations before getting there anyway (e.g. filesystem limits)!

@jcohen02
Copy link
Collaborator

Fix merged into master. I'm due to create a 0.3.1 patch release once some issues with the CI infrastructure are sorted out. Given that this introduces a database change, I'm inclined to include this in a 0.4.0 release so that anyone who wants to avoid the DB change can stick with the 0.3.x releases.

@iver56
Copy link
Contributor Author

iver56 commented Jun 25, 2021

Thanks for the swift and positive response :) Yes, it makes sense to include it in the 0.4.0 release given that it contains a DB migration

@iver56
Copy link
Contributor Author

iver56 commented Aug 26, 2021

Do you know roughly when 0.4.0 will be released? I'm asking because a colleague of mine proposes to cherry-pick the commit that fixes this (while we wait), but I feel like it's cleaner to wait and upgrade to 0.4.0 once it becomes available 😇

@jcohen02
Copy link
Collaborator

Thanks for checking and apologies for the delay. I was actually hoping to also implement something for #51 in v0.4.0 since that is also likely to require a DB migration. However, I've not had a chance to look at that due to other commitments so I think it's probably best that I proceed with the v0.4.0 release to get the large file support in place and then push the other new features back to a later release. Just some final checks to go through and assuming all is looking OK, I'll aim to have 0.4.0 out and on PyPi within the next day or so.

@jcohen02
Copy link
Collaborator

@iver56 release v0.4.0 with the large upload support is now out and available on PyPi. Any issues, let me know.

@iver56
Copy link
Contributor Author

iver56 commented Aug 27, 2021

Great! Thanks! I will give it a spin :)

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

No branches or pull requests

2 participants