You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to store the size of a file uploaded for clients to be able to restrict how large uploads are and notify users of how large file is before loading images when the website runs.
Once this is done:
Size of uploaded files will be stored in database
API requests for attachments will include file size information
Include a migration for updating information of already existing attachments
possible code: size = models.IntegerField(blank=True, )
The text was updated successfully, but these errors were encountered:
Hi @xinranh2, it would be good to get some more detail on the problem you're looking to solve here.
Regarding limiting the size of uploaded files, I believe that's covered in #38. Storing the file size in the database won't necessarily help here, since you would probably just reject the upload outright.
Regarding storing the file size in the database to relay back to people who may download it - is the reason you can't read this from the filesystem that the files are stored externally, eg. S3?
We want to store the size of a file uploaded for clients to be able to restrict how large uploads are and notify users of how large file is before loading images when the website runs.
Once this is done:
possible code:
size = models.IntegerField(blank=True, )
The text was updated successfully, but these errors were encountered: