A simple web server with file upload and download, written in Node.js
10K+
A simple web server with file upload and download, written in Node.js
POST /my-file to upload a fileGET /my-file to download a fileDELETE /my-file to delete a fileGET / to list the filesThere are no subfolders, only one root folder.
None
Install locally:
npm install -g http-folder
On kubernetes, you can use the public helm repository.
# Start the server
$ mkdir /tmp/files
$ http-folder /tmp/files 4242
Serving /tmp/files on port 4242
# or HTTP_FOLDER_ROOT_DIR=/tmp/files HTTP_FOLDER_PORT=4242 http-folder
# Upload
$ cat original-file
some content
$ curl --data-binary "@original-file" http://localhost:4242/uploaded-file
Uploaded succesfully$
# Download
$ curl -s http://localhost:4242/uploaded-file -o downloaded-file
$ cat downloaded-file
some content
# Delete
$ curl -XDELETE http://localhost:4242/uploaded-file
Deleted successfully$
Largely based on https://github.com/krvikash35/nodejs-download-upload-server
Content type
Image
Digest
Size
37.4 MB
Last updated
almost 7 years ago
docker pull aureliengasser/http-folder