Node/Multer Get Filename

前端 未结 6 1828
甜味超标
甜味超标 2021-02-03 21:45

I am using the following to upload files to a directory via Multer. It works great, but I need to perform some actions after upload that require the name of the file I just post

6条回答
  •  礼貌的吻别
    2021-02-03 22:27

    Accessing uploaded files data differs in Multer, depending whether you are uploading single or multiple files. Access data like so:

    uploading single file:

    req.file
    

    uploading multiple files:

    req.files
    

提交回复
热议问题