poemyear / pickpic

2 stars 0 forks source link

Generate thumbnails using gm #18

Closed poemyear closed 5 years ago

poemyear commented 5 years ago
brew install imagemagick graphicsmagick
npm install imagemagick graphicsmagick --save
npm install gm --save
npm install acorn --save

npm audit fix 도 해줬는데, 이건 내 로컬만 그런건지 잘 모르겠음

해보시고 오류 없이 잘 생성된다면 dev로 merge부탁, Postman Events/Create Events API도 업데이트함 (title, expiredAt 추가)

poemyear commented 5 years ago

https://github.com/poemyear/pickpic/blob/4f98a21cf03122a3ad2c8d0d96824b52a3507ae9/pickpicServer/routes/events/index.js#L9-L20

위 함수를 multer 이후 request handler에 등록, req.files[] 에 thumbnail 정보 저장 router.post('/', upload.array("userfile"), generateThumbnnail, controller.create);

poemyear commented 5 years ago

아참 pickpicServer/thumbnail 폴더 만들어줘야함;;