Skip to content

Commit

Permalink
[#44] Comment: export multer jsDoc ์ž‘์„ฑ
Browse files Browse the repository at this point in the history
  • Loading branch information
meoraeng committed Oct 14, 2022
1 parent 29f837a commit 7f57075
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/loaders/multer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const storage = multer.diskStorage({
})
/**
* ์ด๋ฏธ์ง€ ํŒŒ์ผ ์—…๋กœ๋“œ์— ๋Œ€ํ•œ multer ์„ธํŒ…
* @param {Object} storage ์ €์žฅํ•  ๊ณต๊ฐ„์— ๋Œ€ํ•œ ์ •๋ณด
* @param {Object} limits ํŒŒ์ผ ๊ฐœ์ˆ˜๋‚˜ ํŒŒ์ผ ์‚ฌ์ด์ฆˆ๋ฅผ ์ œํ•œ ex) 5*1024*1024 => 5MB
* @param {function} fileFilter ์–ด๋–ค ํ˜•์‹์˜ ํŒŒ์ผ์„ ๋ฐ›์„์ง€ ์ •์˜
* @return {Object} ์—ฌ๋Ÿฌ ๋ฏธ๋“ค์›จ์–ด ์กด์žฌ, ์—…๋กœ๋“œ ๋ฐฉ์‹์— ๋”ฐ๋ผ `single`, `array`, `fields` ์‚ฌ์šฉ
* @param {string} propertyName ๋ฏธ๋“ค์›จ์–ด๋“ค์˜ ์ธ์ˆ˜๋Š” form data์˜ ์†์„ฑ๋ช… or ํƒœ๊ทธ input์˜ name
*/
export const upload = multer({
storage: storage,
Expand Down

0 comments on commit 7f57075

Please sign in to comment.