multer-selectel-storage
v1.0.3
Published
Multer storage for selectel CDN
Downloads
3
Maintainers
Readme
multer-selectel-storage
multer storage for selectel cdn
Installation
npm install multer-selectel-storage
Usage
var multer = require('multer');
var SelectelStorage = require('multer-selectel-storage');
var upload = multer({
storage: new SelectelStorage({
login: 'abc',
password: 'xyz',
container: 'development',
baseUrl: 'https://123.cdn.example.com/development/',
// optional custom filename generator
generateFilename: function generateFilename (file, req) {
return Math.random() + path.extname(file.originalname);
},
//optional parameter for cache cleaning on cdn side
clearCache: true
})
});
License
MIT