-
See Also
- ServiceExecute
- ServiceConnect
- DataConnectionObject
-
- Data Connections
- Dropbox
- OneDrive
- AmazonS3
- AzureBlobStorage
-
-
See Also
- ServiceExecute
- ServiceConnect
- DataConnectionObject
-
- Data Connections
- Dropbox
- OneDrive
- AmazonS3
- AzureBlobStorage
-
See Also
"Dropbox" (Service Connection)
Connecting & Authenticating
Requests
User Data
"UserData" — data about the authenticated user's account
Search
"FileSearch" — search file names within a directory
| "Query" | (required) | query string | |
| "Path" | "/" | directory to search |
Uploading
"Upload" — add or update the contents of a file
"Put" — put a Wolfram Language expression in a file
| "File" | (required for Upload) | file path or File[...] | |
| "Expression" | (required for Put) | Wolfram Language expression | |
| "Path" | (required) | path in dropbox account | |
| "Mode" | "Add" | write mode ("Add", "Overwrite" or "Update") | |
| "Autorename" | True | rename if there is a name conflict |
Downloading
"Get" — get a Wolfram Language expression from a file
"FileContents" — get the raw contents of a file as a byte array
| "Path" | (required) | path in dropbox account | |
| "Destination" | $TemporaryDirectory | path to download the file |
Files and Directories
"FileNames" — list the files in a directory
"DirectoryData" — directory metadata
"CreateDirectory" — create a directory
"DeleteDirectory" — delete a directory
| "Path" | (required) | path in dropbox account | |
| "Recursive" | False | whether to recursively list files in a directory |
Examples
open all close allBasic Examples (2)
Create a new connection to your Dropbox account:
dropbox = ServiceConnect["Dropbox"]dropbox["Upload", <|"Path" -> "/WolframData/test.csv", "File" -> "test.csv"|>]Retrieve the file and save it to the temporary folder:
dropbox["Download", "Path" -> "/WolframData/test.csv"]expr = DSolve[y'[x] + y[x] == a Sin[x], y[x], x]ServiceExecute["Dropbox", "Put", <|"Path" -> "/WolframData/rawexpr.txt", "Expression" -> expr|>]fromDropbox = ServiceExecute["Dropbox", "Get", <|"Path" -> "/WolframData/rawexpr.txt"|>]The expression is returned as it is:
fromDropbox === exprScope (1)
Create a plot to store in Dropbox:
sinplot = Plot[Sin[4 x], {x, -2 Pi, 2Pi}]ServiceExecute["Dropbox", "Put", <|"Path" -> "/WolframGraphics/sinplot.jpg", "Expression" -> sinplot, "Autorename" -> True|>]ServiceExecute["Dropbox", "FileNames", <|"Path" -> "/WolframGraphics"|>]Retrieve the metadata for the file:
ServiceExecute["Dropbox", "FileData", <|"Path" -> "/WolframGraphics/sinplot.jpg"|>]ServiceExecute["Dropbox", "Get", <|"Path" -> "/WolframGraphics/sinplot.jpg"|>]See Also
ServiceExecute ▪ ServiceConnect ▪ DataConnectionObject
Data Connections: Dropbox ▪ OneDrive ▪ AmazonS3 ▪ AzureBlobStorage