Hi! In the documentation, the BinaryField has a warning called “Abusing BinaryField” that states:
> Although you might think about storing files in the database, consider that > it is bad design in 99% of the cases. This field is not a replacement for > proper static files handling. https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.BinaryField I agree with the intention of this warning: we don't want people to start using their database for image uploads, large static files, or thinking they can completely replace proper static file serving with a databse. That said, I think this warning is a huge overstatement. I think the moment you're wondering "maybe this would be a good usecase to store it in my database", your case for storing files in database might not be absurd at all. There are tradeoffs, that are documented here, for instance: https://wiki.postgresql.org/wiki/BinaryFilesInDB . It's definitely not as clear-cut as "don't do it". People should be aware of the tradeoffs instead of just dismissing the possibility. Can I suggest replacing the warning by something like this?: > Although you might think about storing files in the database, consider that > it might be a bad design choice. This field is not a replacement for proper > static files handling. > > That said, there might be cases where you do want the guarantees that the > database offers you for binary files. Be sure to be aware of the > trade-offs[1] before you decide to do so. > [1]: https://wiki.postgresql.org/wiki/BinaryFilesInDB As I'm not subscribed to this mailing-list, I would appreciate to be CC'd to the responses :-) Cheers, -- Antoine Pietri -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/28cec919-ae57-4eed-960b-d598a01c2711%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.