Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akshat120/files-upload


https://github.com/akshat120/files-upload

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# Files Uploads in MongoDB



  • GridFS: Large images (or binary blobs) can be stored using the GridFS API. This API is supported by official MongoDB drivers: it splits large files into smaller chunks (255KiB by default) which are stored as separate documents in an fs.chunks collection with a reference document including metadata in an fs.files collection (note: the default fs.* namespace can be changed). The GridFS API is a client-side implementation – a MongoDB deployment doesn’t have any special configuration for the underlying collection data. For more info on the implementation, see the GridFS spec on GitHub.

  • Inline: Smaller images (within the 16MB document size limit) can be stored directly in a MongoDB document using the BinData (binary data) BSON type.


  • Reference: Images can be saved to an API or filesystem, with only the image reference stored in the database.

More-Info