Django file system storage for a large number of files

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!

+5
source share
3 answers

Consider storing content in a MongoDB collection.

, MongoDB , . "" , MongoDB, - 16 .

, Mongo gridfs.

. GridFS.

+2

django-castor.

django-castor Django, . , djcastor.storage.CAStorage, FileSystemStorage, SHA-1.

  • , , - , .

  • , .

  • django-castor shards uploads ; , .

+2

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.

0
source

All Articles