Browse Source

Fix upload scripts for v1 API.

pull/1/head
Brett Bohnenkamper 4 years ago
parent
commit
38f788fa30
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Upload/teknik.sh
  2. 1
    1
      Upload/upload.sh

+ 1
- 1
Upload/teknik.sh View File

@@ -86,7 +86,7 @@ desktop() {

# This function uploads the $file
upload() {
url=$(curl --silent -F file="@$uploadme" "https://api.teknik.io/upload/post")
url=$(curl --silent -F file="@$uploadme" "https://api.teknik.io/v1/Upload")
if [[ "${url}" =~ "error" ]]; then
printf 'error uploading file!\n'
exit 1

+ 1
- 1
Upload/upload.sh View File

@@ -13,7 +13,7 @@ else
n=1
for i in "$@"; do
printf "\nUploading file #${n} ... "
out=$(curl -sf -F file="@${i}" https://api.teknik.io/upload/post)
out=$(curl -sf -F file="@${i}" https://api.teknik.io/v1/Upload)
if [[ "${out}" =~ "error" ]]; then
printf 'error uploading file!\n'
exit 1

Loading…
Cancel
Save