Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 852 Bytes

README.md

File metadata and controls

47 lines (28 loc) · 852 Bytes

sharex-image-host

Minimal ShareX image host written in js using express and express-fileupload.

Installation

npm i to install dependencies

node . to run the server

Configuration

Config is stored in .env

Example:

PORT="1337" # port to run the application on
IMAGE_AUTH="yourpassword" # password protection for image upload and deletion. You can also have multiple users like this: IMAGE_AUTH="yourpassword, yourfriendspassword"

Usage

POST /upload

Headers: Authorization: YOUR_PASSWORD

Form-data: image: THE_IMAGE

Response: 200

{
	"filename": "example"
}

After that, the image will be available at yourdomain.com/i/:filename You can also append ?download=true to the end of the url to download the image


DELETE /:image

Headers: Authorization: YOUR_PASSWORD

Response: 204