Sign inSign up

ty0924/hfm

By ty0924

•Updated almost 7 years ago

Most simple file upload, download API via HTTP

Image
0

1.5K

ty0924/hfm repository overview

⁠Settings
Port: 8090
Mount: /srv

⁠Functions
[Post] /upload - Upload file or image
[Get] /[PATH] - Download file or image

⁠Notice
If you want to store file persistent, then mount /srv as you want

⁠NodeJS uploading example
let req = request.post("http://[YOUR_DOMAIN]:8090/upload", function (err, resp, body) {
    if (err) {
        console.log('Error');
    } else {
        console.log("Uploaded");
    }
});

let form = req.form(); form.append("filePath", 'PATH/TO/FILE.PNG'); form.append('fileData', 'FILE_DATA', { filename: 'FILE.PNG', contentType: 'image/png' });

⁠GitHub
https://github.com/ty0924/hfm⁠

Tag summary

Content type

Image

Digest

Size

125.2 MB

Last updated

almost 7 years ago

docker pull ty0924/hfm