You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
When the upload request is interrupted during the upload of a file, a Parse Error message will be displayed. If you delete the file and upload it again, an operation not permitted message will be displayed.
Input Code
constKoa=require('koa');constcors=require('@koa/cors');const{ bodyParser }=require('@koa/bodyparser');conststatic=require('koa-static');constmulter=require('@koa/multer');constRouter=require('@koa/router');constapp=newKoa();app.use(cors());app.use(bodyParser({jsonLimit: '50mb'}));app.use(static('F://'));constrouter=newRouter();constupload=multer({dest: 'F://新建文件夹',limits: undefined,});router.post('/upload',upload.single('file'),async(ctx)=>{try{ctx.status=200;ctx.body={code: 200,msg: '文件上传成功',};}catch(err){console.log('upload error:',err);ctx.status=500;}});app.use(router.routes());app.on('error',(err)=>console.error('Request error:',err));app.listen(9528,()=>console.log('Server start on port 9528'));
Bug Report
Current Behavior
When the upload request is interrupted during the upload of a file, a Parse Error message will be displayed. If you delete the file and upload it again, an operation not permitted message will be displayed.
Input Code
Expected behavior/code
The program runs normally
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: