Public Repository

Last pushed: a year ago
Short Description
Quick and easy dockerized file server
Full Description

FileServer

Tired of saving data in the database?

Look no further this is a quick and easy solution for storing and exposing your files.

Installation

$ docker run -dit --name fileserver -p 8081:8081 -p 8082:8082 -v /fileserver:/fileserver -e HOST="domain-or-ip.com" -e PROTOCOL="http" agna/fileserver

Adding files

Files are added with a POST request via API.

[URL] mydomain.com:8082/uploads
[HEADER] multipart/form-data
[PAYLOAD] { file: { value: '[...]', options: { filename: 'example.pdf' } } }

The value field is binary data.

Testing it out

You can test your running file-server in Postman by doing the following steps:

  1. Create a new POST request
  2. Enter the URL (make sure to use your specified domain, ip, or localhost
  3. Under the Body section, select: form-data
  4. Add a key name: file
  5. Change value type to File and browse to add file.
  6. Submit request and receive file URL

If you have any questions please feel free to ask in the comments.

Docker Pull Command
Owner
agna

Comments (0)