multer-selectel-storage

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i multer-selectel-storage

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • boo1ean