mirror of
https://github.com/lyx0/yaf.git
synced 2024-11-13 19:49:53 +01:00
doc: add usage instructions to README
This commit is contained in:
parent
6e9346e741
commit
9cd60561e2
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -52,6 +52,16 @@ jaf -configFile example.conf
|
|||
```
|
||||
Of course, you can also write a init system script to handle this for you.
|
||||
|
||||
## Usage
|
||||
You can use jaf with any application that can send POST requests (e.g. ShareX/ShareNix or just `curl`).
|
||||
Make sure the file you want to upload is attached as a `multipart/form-data` field named `file`.
|
||||
In `curl`, a request to upload the file `/home/alice/foo.txt` could look like this:
|
||||
```bash
|
||||
curl -L -F "file=@/home/alice/foo.txt" jaf.example.com/upload
|
||||
```
|
||||
The response will include a link to the newly uploaded content.
|
||||
Note that you may have to add additional header fields to the request, e.g. if you have basic authentication enabled.
|
||||
|
||||
## Inspiration
|
||||
- [i](https://github.com/fourtf/i) by [fourtf](https://github.com/fourtf) – a project very similar in scope and size
|
||||
- [filehost](https://github.com/nuuls/filehost) by [nuuls](https://github.com/nuuls) – a more integrated, fully-fledged solution that offers a web interface and also serves the files
|
||||
|
|
Loading…
Reference in a new issue