
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
mongo-dcms-core
Advanced tools
core libarary of mongodb document content management system
npm install mongo-dcms-core --save
ConnectionUrl : mongodb url e.g mongodb://localhost/dcms-store.document : an object conatining following properties.
filePath : path where file is stored.fileName : file name to be populated in database.contentType : content type of file . e.g. binary/octet-stream.identityMetaData : an object containing properties which will uniquely identify document in mongodb.additionalMetadata: Additional metadata to be stored along with identityMetaData.callback(err, file) : A callback is called when file is added into mogodb or error occured.
err : string if error else null.file an object containg following properties.
fileId : id of mongodb record.fileMetaData: metadata of the file.fileDetails : An object containing following properties
fileName : file name to search (optional)identityMetaData : identity metadata to searchcallback(err,files) : A callback is called when search is completed or error occured.
err : string if error else null.files :  An array of file object. File object properties (_id, filename, uploadDate and metadata)fileId : mongodb _id.callback(err,file) : A callback is called when item found and contents are read or error occured.
file :
fileData : byte array of content.contentType : content type as a string.fileMetadata : object containing metadata.var mongoDcmsCore = require('mongo-dcms-core');
mongoDcmsCore.connect("mongodb://localhost/dcms-core");
mongoDcmsCore.uploadFile({filePath : '/tmp/appUploads/acd-001f-1234.jpg', fileName : 'profileImage.jpg' ,contentType : 'binary/octet-stream', 'identityMetaData' : {profileId : 12345} },{comment = 'new one at Taj'},function(err,result) {
    if(err) {
        //error handling
    }else {
        // process result
    }
});
npm test
FAQs
core library of mongodb document content management system
We found that mongo-dcms-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.