The contents of this guide have been moved to our documentation website here.
This thread will remain open for discussion.
The contents of this guide have been moved to our documentation website here.
This thread will remain open for discussion.
If the API provides a way to receive a file from a post request, then it should work exactly the same.
But the authentication might be different if you are using another API.
Copy/paste the last chunk of codes give me error when executing in the web terminal, I suspect copy from this forum is messing up the code with hidden characters etc. Unfortunately i know to little Linux to tell what is wrong. Anyway, this is the error i get.
I changed the command slightly earlier today, by adding newlines to make it more readable, but I think i might have introduced a (few) typos…
I have updated the command above, can you try again?
Best regards
/Malte
Thank you Malte. Worked just fine now.
hello! I have some errors:
" % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:–:--
–:--:-- --:–:-- 0\r 0 4692k 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0\r 13 4692k 0 0 13 624k 0 406k 0:00:11 0:00:01 0:00:10 407k\r 33 4692k 0 0 33 1584k
0 626k 0:00:07 0:00:02 0:00:05 627k\r 62 4692k 0 0 62 2912k 0 827k 0:00:05 0:00:03 0:00:02 827k\r 90 4692k 0 0 90 4256k 0 940k 0:00:04 0:00:04 --:--:-- 940k\r100 4692
k 0 90 100 4692k 18 941k 0:00:04 0:00:04 --:–:-- 1058k\nError in call to API function “files/upload”: The given OAuth 2 access token is malformed.curl: (3) Illegal characters found in URL\ncurl: (3)
Illegal characters found in URL\ncurl: (3) Illegal characters found in URL\ncurl: (3) Illegal characters found in URL"
sorry … I’m not understanding anything anymore …
I copied the code and put my token
but I always get errors
Hi Toch
Can you try removing the backslashes and the newlines \ on each line, so that it looks like this instead
cmd.run 'curl -X POST https://content.dropboxapi.com/2/files/upload --header "Authorization: Bearer YOUR_ACCESS_TOKEN" --header "Dropbox-API-Arg: {\"path\": \"/minion.gz\"}" --header "Content-Type: application/octet-stream" --data-binary @/var/log/salt/minion.gz'
(remember to replace the token again)
Best regards
/Malte
I tried, unfortunately it doesn’t work …