1.0.1 • Published 6 years ago
express-file-hosting v1.0.1
File hosting
Install
git clone https://github.com/nulnow/express-file-hosting.git
cd express-file-hosting
npm installRun the app
npm startRun the app (dev mode)
npm run start:devAdmin panel
Run the app in dev mode
npm run start:devNavigate to the http://localhost:6060/
Run the tests
npm testAPI
The API to the app is described below.
Upload a files
Request
POST /upload
curl -F ‘data=@path/to/local/file’ http://localhost:6060/uploadResponse
[{
url: <url>,
guid: <guid>,
name: <name>
}]Get a file
Request
GET /download/<guid>[/<filename>]
curl http://localhost:6060/download/<guid>[/<filename>] --output file.jpgResponse
<File body>