Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature proposal: save file_size in database #249

Open
fabianhohly opened this issue Nov 1, 2024 · 0 comments
Open

Feature proposal: save file_size in database #249

fabianhohly opened this issue Nov 1, 2024 · 0 comments

Comments

@fabianhohly
Copy link

Saving the file_size in the database is already implemented for Wagtail images and documents.

file_size = models.PositiveIntegerField(null=True, editable=False)

The file_size is set in the save function, for example, in BaseImageForm.

I suggest implementing this for media as well. This would have the advantage of allowing objects to be sorted directly by file_size.

@fabianhohly fabianhohly changed the title feature proposal: save file_size in database Feature proposal: save file_size in database Nov 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant