express-file-hosting

1.0.1 • Public • Published

File hosting

Install

git clone https://github.com/nulnow/express-file-hosting.git
cd express-file-hosting
npm install

Run the app

npm start

Run the app (dev mode)

npm run start:dev

Admin panel

Run the app in dev mode

npm run start:dev

Navigate to the http://localhost:6060/

admin panel

Run the tests

npm test

API

The API to the app is described below.

Upload a files

Request

POST /upload

curl -F ‘data=@path/to/local/file’ http://localhost:6060/upload

Response

[{
    url: <url>,
    guid: <guid>,
    name: <name>
}]

Get a file

Request

GET /download/<guid>[/<filename>]

curl http://localhost:6060/download/<guid>[/<filename>] --output file.jpg

Response

<File body>

Readme

Keywords

none

Package Sidebar

Install

npm i express-file-hosting

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

128 kB

Total Files

10

Last publish

Collaborators

  • nulnow