@appgeist/storage example
A simple example to demonstrate the usage of @appgeist/storage.
yarn install
ornpm install
yarn dev
ornpm run dev
- Upload files by
POST
ing requests to paths such ashttp://localhost:3000
orhttp://localhost:3000/subfolder/to/store
. In Postman, make sure to set Body type toform-data
, add a File property withfile
key and select a file to upload. - Request uploaded files by accessing URLs such as
http://localhost:3000/ceb88dea-5135-4321-8af8-846e29b7efc4.webp
,http://localhost:3000/ceb88dea-5135-4321-8af8-846e29b7efc4.jpg
,http://localhost:3000/ceb88dea-5135-4321-8af8-846e29b7efc4-w200-h200.webp
,http://localhost:3000/ceb88dea-5135-4321-8af8-846e29b7efc4-w50-h50-lq.jpg
, whereceb88dea-5135-4321-8af8-846e29b7efc4
is the UUID returned by successfully uploading a picture tohttp://localhost:3000
.
See @appgeist/storage README for more info and feel free to inspect the source code.
The ISC License.