up: switch to multipart form for uploading, since guessing the content type locally with file often messes up
This commit is contained in:
parent
19b8f350cf
commit
00cfff8194
1 changed files with 2 additions and 4 deletions
|
@ -1,12 +1,10 @@
|
|||
#!/bin/zsh
|
||||
|
||||
upload() {
|
||||
http --check-status --ignore-stdin \
|
||||
http --check-status --ignore-stdin --form \
|
||||
POST https://up.00dani.me/ \
|
||||
Authorization:$UP_TOKEN \
|
||||
Content-Type:$(file --mime-type -b $1) \
|
||||
X-Filename:$1 \
|
||||
@$1
|
||||
file@$1
|
||||
}
|
||||
|
||||
if (( $# == 0 )); then
|
||||
|
|
Loading…
Reference in a new issue