Add alias to readme

This commit is contained in:
Kieran 2022-09-09 12:51:45 +01:00
parent de651ca769
commit 2dac9be1c1
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -34,6 +34,22 @@ curl -X POST \
"https://void.cat/upload?cli=true"
```
Or you can create an alias function in `~/bash_aliases` like so:
```bash
vcu() {
echo "Uploading $1"
curl -X POST \
-H "V-Content-Type: $(file --mime-type -b $1)" \
-H "V-Full-Digest: $(sha256sum -bz $1 | cut -d' ' -f1)" \
-H "V-Filename: $1" \
--data-binary @$1 \
"https://void.cat/upload?cli=true"
echo -e ""
}
```
Uploading from cli will simply become `vcu memes.jpg`
This command will return the direct download URL only.
To get the json output simply remove the `?cli=true` from the url.