imghost

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 12 Imported by: 0

README

appserve donuts-are-good's followers donuts-are-good's stars donuts-are-good's visitors

imghost

imghost is an image server in Go. It accepts images via POST, resizes and crops images, and saves them to a directory. The server logs details about the images.

installation

  • Clone the repository.
  • Navigate to the project directory.
  • Run go build.

usage

  • Run the server with ./imghost.
  • If config.json does not exist, a new one will be created. Modify this file as needed.
  • Send a POST request to the upload route in config.json. Include an image file and a secret key.

configuration

The config.json file has these fields:

  • SecretKey: A key to authorize image uploads.
  • ImageDirectory: A directory where images will be saved.
  • ImageUrl: A base URL for accessing the images.
  • Port: A port for the server.
  • ResizeWidth: A width to resize images to.
  • ResizeHeight: A height to resize images to.
  • CropWidth: A width to crop images to.
  • CropHeight: A height to crop images to.
  • ImageFormat: A format to save images in.
  • UploadRoute: A route to accept image uploads.
  • AllowedIPs: A list of IPs allowed to upload images.
  • LogFilePath: A path to a log file.

license

MIT License 2023 donuts-are-good, for more info see license.md

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL