Mi Lugarcito
Nuxt - Multer 사용하기 본문
productUploadImg & productUpload api 2개를 호출함
api -> router 확인하기
productUpload 라는 multer를 먼저 탄다->postProduct & postProductImg 멀터 다같이 핸들링함
productStorage에서 검사 먼저 하고
이후 postProduct / postProductImg (editor 관련) 라는 api를 백단에서 타고
프론트에서 postProduct api 호출한 것에 있어서 예외처리 해준다
&
postProductImg는 이미 에디터에서 사진 업로드 완료 전에 멀터에서 용량 먼저 체크후 업로드 제한해줌
참고할 파일들
'Vue & Nuxt.js' 카테고리의 다른 글
Nuxt - Sharp 사용하기 (0) | 2022.02.14 |
---|---|
Nuxt.js, JWT 발급해서 access, refresh token -> cookie 쿠키 저장하기 (0) | 2022.02.11 |
Vue - Component & Page 상관관계 (0) | 2022.02.04 |
Vue - created & mounted 차이점 (0) | 2022.02.02 |
Vue - ref 역할 알아보기 (0) | 2021.12.09 |