Sign inSign up

agna/fileserver

By agna

•Updated almost 10 years ago

Quick and easy dockerized file server

Image
0

273

agna/fileserver repository overview

⁠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] { "Content-Type": "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.

Tag summary

Content type

Image

Digest

Size

20.7 MB

Last updated

almost 10 years ago

docker pull agna/fileserver