1.0.9 • Published 3 years ago

wdfileupload v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

file_upload

install

npm i @gswl/fileupload

Usage

import fileupload from @gswl/fileupload;

/**
 * 
 * @param 上传参数 
 * { 
 *  servePath: string,  上传服务器地址
 *  filePath: string,  上传文件路径
 *  temp?: any,  是否为临时文件,不传是正常文件,传任何值都是临时文件
 *  needIgnores?: string[]  需要忽略的文件
 * }
 * */
fileupload(param).then(res=>{
    // res :
    // {
    //     msg: '文件上传成功',
    //     code: 200,
    //     downLoadUrl:'xxxx'
    // }
}).catch(error=>{
    // error
});