最終更新:2023-10-26 (木) 05:10:08 (190d)  

multer.diskStorage
Top / multer.diskStorage

https://expressjs.com/en/resources/middleware/multer.html

destination

  • used to determine within which folder the uploaded files should be stored.

filename

  • used to determine what the file should be named inside the folder.
  • If no filename is given, each file will be given a random name that doesn’t include any file extension.

衝突

uniqueSuffix

  • const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9)
    1698264542874-92346936