multer-ftp-storage
Version:
A FTP storage for multer
19 lines (14 loc) • 410 B
JavaScript
const path = require("path");
// file name uploading to FTP
const default_filename = (_req, file) => {
// const fileExt = path.extname(file.originalname);
return `${Date.now()}_${file.originalname}`;
};
// Default credientials
const ftp_config = {
host: "localhost",
user: "yourName",
password: "yourPass",
secure: false,
};
module.exports = { default_filename, ftp_config };