https://github.com/duckthom/node-image
A simple image sharing server written for node.
https://github.com/duckthom/node-image
image-upload node-js nodejs
Last synced: about 1 month ago
JSON representation
A simple image sharing server written for node.
- Host: GitHub
- URL: https://github.com/duckthom/node-image
- Owner: DuckThom
- Created: 2017-06-16T15:11:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-02T19:12:13.000Z (over 7 years ago)
- Last Synced: 2025-05-21T16:50:47.207Z (about 1 year ago)
- Topics: image-upload, node-js, nodejs
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-image
---
A simple node app for image uploading and serving.
## How to use
- Uploading
1. (optional but recommended) Set an api key in `./keys.json`.
2. Send a post request to `/upload` with the image file in the `image` parameter and API key in the `key` parameter if necessary.
3. 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
1. Go to `/view/:imageName` where `:imageName` is the name of a file in `./public/images`.
## API Key file
```json
[
{
"value": "This is where the API key goes",
"name": "(optional) A name for the thing that will use the key for identification"
}
]
```