文件上传服务,bee-upload 组件的测试用例
npm run start
接口地址:http://localhost:8083/api/reg
在 bee-upload 组件中,配置 action 参数为接口地址即可
const props = {
name: 'file',
action: 'http://localhost:8083/api/reg',
headers: {
authorization: 'authorization-text',
},
onChange(info) {
if (info.file.status === 'done') {
console.log(`${info.file.name} file uploaded successfully`);
}
},
};
上传的文件会存储到 upload-server/public 目录下