
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
GridFile is a reusable Mongoose schema for MongoDB GridFS. No separate database setup is needed as it uses the Mongoose connection for interacting with GridFS.
npm install gridfile
const schema = require('gridfile')
const GridFile = mongoose.model('GridFile', schema)
const fileStream = fs.createReadStream('/path/to/file.ext')
const gridFile = new GridFile()
gridFile.filename = 'file.ext'
await gridFile.upload(fileStream)
const fileStream = fs.createWriteStream('/path/to/file.ext')
const gridFile = GridFile.findById('id')
await gridFile.download(fileStream)
Documentation is available at API.md
Head over to the issues tab at github.com to report a bug or suggest an improvement. Feel free to contribute to the code or documentation by creating a pull request.
If you find the project interesting or helpful, please consider sponsoring or supporting it at github.com.
FAQs
GridFile is a reusable Mongoose schema for MongoDB GridFS
We found that gridfile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.