Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
/ goimage Public archive

A simple image server made in Go (Golang).

License

Notifications You must be signed in to change notification settings

omarhachach/goimage

Repository files navigation

goimage - A simple image uploader/server

Travis branch GitHub tag Report Card Powered By License

Goimage is a simple, fully functional, go server for handling image uploads. It is fully standalone, but can be put behind a reverse-proxy.

Releases | Docs

Menu

Features

  • Simple and easy configuration
  • CSRF Protection
  • Performant and efficient
  • More coming soon..

Getting Started

Download the latest release for your platform, and extract the files.

Create a config.json file in the root directory. Example:

{
    "port": 8080,
    "max-file-size": 5242880,
    "name-length": 6,
    "file-buffer-size": 1310720,
    "file-upload-location": "./img/",
    "allowed_mime_types": [
        "image/x-icon",
        "image/jpeg",
        "image/pjpeg",
        "image/png",
        "image/tiff",
        "image/x-tiff",
        "image/webp",
        "image/gif"
    ],
    "allowed_extensions": [
        "png",
        "jpeg",
        "jpg",
        "jiff",
        "ico",
        "gif",
        "tif",
        "webp"
    ]
}

Then run the program. For Linux, in a terminal window, you would run:

$ ./goimage

On a Windows machine, you would open a command prompt window, and run:

> goimage.exe

Benchmarks

Coming soon..

Running from Source

You can do this two ways; either by using go get, or git clone.

Not recommended for production use.

Note: Requires Go 1.9 or greater installed on the system.

Git Clone

git clone https://github.com/omarhachach/goimage.git
cd goimage/api/cmd
go build .
./goimage

Go Get

Note: You need to have the GOPATH env variable set.

go get github.com/omarhachach/goimage
cd $GOPATH/src/github.com/omarhachach/goimage/cmd/goimage
go build .
./goimage

Contributing

Please check out our the CONTIRBUTING file for more information about contributing.

You can contact the author on Discord: Omar H.#6299 or via email: contact@omarh.net.

If you feel something is missing, or you find a bug, you can feel free to open an issue or a pull request. I will check your issue or pull request as soon as possible.