The demo uses libheif
- Make sure Node.js is available
$ yarn # or npm install
$ node demo.js
$ node server.js # default port 8000, or use PORT environment variable to specify a different port.
Open your browser and go to http://localhost:<port>/demo.html
.
$ yarn # or npm install
$ node express-demo.js # default port 8000, or use PORT environment variable to specify a different port.
In a new terminal window
$ curl http://localhost:<port>/img/upload -F file=@somefile.ext
To view the uploaded image, copy the file_name
returned and send a GET request to http://localhost:<port>/img/<file_name>
in your browser.