git clone https://github.com/monicagangwar/imageCompress.git
cd imageCompress
npm install
node server.js
Apis are designed to consume jpeg / png images
curl -X POST \
http://localhost:3000/api/compressFromPhoto \
-F 'image=${path_to_image}'
curl -X POST \
http://localhost:3000/api/compressFromUrl \
-H 'content-type: application/json' \
-d '[ "https://www.filepicker.io/api/file/Trc6VsKQouTn7lHAVKJg", "https://www.filepicker.io/api/file/XLU8pMCPQDGrdx19RkAs" ]'
curl -X POST \
http://localhost:3000/api/compressFromCsv \
-F 'file=@${path_to_csv}'
Csv format
url
https://www.filepicker.io/api/file/XLU8pMCPQDGrdx19RkAs
https://www.filepicker.io/api/file/Trc6VsKQouTn7lHAVKJg