-
Notifications
You must be signed in to change notification settings - Fork 71
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
Media File Size field is too small #1771
Comments
@seth-shaw-unlv +1 for this. We ran into this issue back in the day https://kayakr.gitlab.io/presentation-2019-islandoracon-islandora-in-nz/#/22 |
For an appropriate field widget and whatnot... should we be making use of something like the |
While we do need a big int, I think the one provided by Drupal (8 bytes), which gives us a field representing up to 16 exabytes, is certainly sufficient. I don't think we need to add an extra dependency for 11 more bytes on that column. Of course, this doesn't stop anyone from using it themselves on their own site. |
...? The bigint docs indicates 19 digits, not bytes... it's providing full support for the |
Ah, I see what you mean... although their widget simply extends the core NumberWidget. The Formatter uses a string function to add thousands separators rather than PHP's number_format as Core does although it doesn't document why. |
Actually... not sure about core's behaviour.
... If indeed, as per the second, the number of relevant decimal digits able to be represented in a float is platform-dependent... depending on the version PHP and architecture and whatnot... if 8 bytes gets one ~19 decimal digits, and they're suggesting one only gets 14 or 15 from a 64-bit(/8-byte) float (on common platforms?), one might see disparities show up for those larger numbers of between 14 and 19 digits, when formatted using |
Resolved with Islandora/islandora#829. |
The File Size field we use on media uses a signed normal-size integer. According to Drupal this limits a file to being no more than 2,147,483,647 bytes, just under 2 GB, in size (and I think we can ignore the negative file sizes).
I discovered this when trying to ingest some video files that are just a bit larger than 2GB in size. The file entities were created just fine but the Media entities crashed.
We should, at least, update it to be unsigned (again, negative file sizes don't make any sense) which would allow ~4GB file sizes. Even that is still too small for some video files I've seen, not to mention disk images captured for born-digital collections, so it would be best to use "big integer" as well which (unsigned) gives us up to 16 exabytes.
While the fix for new sites is easy:
we would need to create an update hook for existing sites to resize the relevant column.
The text was updated successfully, but these errors were encountered: