A simple node app for image uploading and serving.
- Uploading
-
(optional but recommended) Set an api key in
./keys.json. -
Send a post request to
/uploadwith the image file in theimageparameter and API key in thekeyparameter if necessary. -
Viewing url is in the response.
Example: curl -X POST -F image=@"/path/to/png/image.png" https://img.example.com/upload?key=some-api-key
- Viewing
- Go to
/view/:imageNamewhere:imageNameis the name of a file in./public/images.
[
{
"value": "This is where the API key goes",
"name": "(optional) A name for the thing that will use the key for identification"
}
]