Scenario: A Django application generates many small files related to objects in different models.
I searched a lot to avoid generating a large number of files in one directory when using the default Filestorage file.
Is django-fsfield the only open source solution for this? What else would you recommend for fixing a large number of inodes in the catalog?
Thank!
Consider storing content in a MongoDB collection.
, MongoDB , . "" , MongoDB, - 16 .
, Mongo gridfs.
. GridFS.
django-castor.
django-castor Django, . , djcastor.storage.CAStorage, FileSystemStorage, SHA-1., , - , ., .django-castor shards uploads ; , .
django-castor Django, . , djcastor.storage.CAStorage, FileSystemStorage, SHA-1.
djcastor.storage.CAStorage
FileSystemStorage
, , - , .
, .
django-castor shards uploads ; , .
django-castor
You can also use a specialized storage manager, which, if the file is small, saves it in a database model with a binary field and saves small files larger than 16 MB and does not need another database.