1.1.11 • Published 3 years ago

ssv-file-upload v1.1.11

Weekly downloads
107
License
bankonly
Repository
-
Last release
3 years ago

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
});
Paramtypedesc
filefile as array or one filefile from form data
pathstringdestination
fileTypestringdefine file's format
resizearray as numberresize image
limitnumberallow to upload by limit
originalNamebooleanuse original name of file
removeSpacebooleanremove space from file's name

function can be use

uploadImageMany fileUpload remove imageValidate createDirIfNotExist resizeImage removeFile removeFileMany uploadImage

1.1.11

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.10

3 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago