1.1.11 • Published 4 years ago
ssv-file-upload v1.1.11
Register
====================
const file = require("ssv-file-upload");
app.use(file.ssv_file_upload);
// ENV
IMAGE_SIZE_ALLOW = 3000000; // bytes = 3MB
IMAGE_TYPE_ACCEPT = jpg, png, jpeg, mp4, mp3, mpeg, wave;
Get start ,image ,videos, files
====================
const path = "./../../img/"
// 1.
file.fileUpload({
file:req.files.img,// img body
path:path
});
// response = {data,code,message,status}
// 2.
file.fileUpload({
file:req.files.img,// img body
path:path,
fileType:"jpg",
originalName:true // if false file's name will be uuid v4
});
// 3.
file.fileUpload({
file:req.files.img,// img body
path:path,
fileType:"jpg",
resize:[800,500],// define your resize image
limit:3
});
Param | type | desc |
---|---|---|
file | file as array or one file | file from form data |
path | string | destination |
fileType | string | define file's format |
resize | array as number | resize image |
limit | number | allow to upload by limit |
originalName | boolean | use original name of file |
removeSpace | boolean | remove space from file's name |
function can be use
uploadImageMany fileUpload remove imageValidate createDirIfNotExist resizeImage removeFile removeFileMany uploadImage
1.1.11
4 years ago
1.1.9
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.10
4 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago