Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akshat120/files-upload
https://github.com/akshat120/files-upload
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akshat120/files-upload
- Owner: Akshat120
- Created: 2021-11-19T07:28:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-20T08:22:09.000Z (almost 3 years ago)
- Last Synced: 2023-07-22T18:28:12.832Z (over 1 year ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.