ExternalStorageUpload[file]
uploads file to an external storage specified by $ExternalStorageBase.
ExternalStorageUpload[file,dest]
uploads file to a specific destination dest for external storage services that support it.
ExternalStorageUpload[filedest]
uploads file to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1,file2,…},dest]
uploads a list of files to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1,file2,…}dest]
uploads a list of files to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1dest1,file2dest2,…}]
uploads a list of files to specific destinations for external storage services that support it.
ExternalStorageUpload
ExternalStorageUpload[file]
uploads file to an external storage specified by $ExternalStorageBase.
ExternalStorageUpload[file,dest]
uploads file to a specific destination dest for external storage services that support it.
ExternalStorageUpload[filedest]
uploads file to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1,file2,…},dest]
uploads a list of files to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1,file2,…}dest]
uploads a list of files to a specific destination dest for external storage services that support it.
ExternalStorageUpload[{file1dest1,file2dest2,…}]
uploads a list of files to specific destinations for external storage services that support it.
Details and Options
- ExternalStorageUpload returns an ExternalStorageObject.
- The default external storage is given by $ExternalStorageBase.
- Possible forms for dest include:
-
"path" path in the external storage service (e.g. Dropbox) "bucket" bucket name in the external storage service (e.g. Amazon S3) "bucket/key" bucket name and key in the external storage service (e.g. Amazon S3) "bucket/prefix/" bucket name and prefix in the external storage service (e.g. Amazon S3) "uri" external storage service URI (e.g. Amazon S3 URI) {"dest1","dest2",…} list of paths, buckets or URIs in the external storage service ExternalStorageObject[…] external storage object - Typical external storage services that support paths include Dropbox and Amazon S3. IPFS does not support paths.
Examples
open all close allBasic Examples (5)
Upload a file to the InterPlanetary File System (IPFS):
ExternalStorageUpload["ExampleData/spikey2.png"]ExternalStorageUpload["ExampleData/spikey2.png", "spikey.png", ExternalStorageBase -> "Dropbox"]Upload a file using an ExternalStorageObject as the target:
ExternalStorageUpload["ExampleData/spikey2.png", ExternalStorageObject[]]Upload multiple files to an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "spikey2.png", "turtle.jpg"};ExternalStorageUpload[files, "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Upload multiple files to specific destinations in an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "photo.jpg", "turtle.jpg"};destinations = Table[StringRiffle[{"wolfram-bucket", "jpgFiles", "image" <> ToString[i] <> ".jpg"}, "/"], {i, 1, 3}]ExternalStorageUpload[files, destinations, ExternalStorageBase -> "AmazonS3"]Scope (8)
Single File (6)
Default destination (1)
Destination specification (5)
Upload a file to Dropbox specifying the target path:
ExternalStorageUpload["ExampleData/spikey2.png", "spikey.png", ExternalStorageBase -> "Dropbox"]Upload a file to Dropbox. If the target directory does not exist, it will be created:
ExternalStorageUpload["ExampleData/spikey2.png", "/NonExistentFolderX77/spikey.png", ExternalStorageBase -> "Dropbox"]Upload a file to an Amazon S3 bucket:
ExternalStorageUpload["ExampleData/spikey2.png", "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Upload a file to a specific path in an Amazon S3 bucket:
ExternalStorageUpload["ExampleData/spikey2.png", "wolfram-bucket/spikeyExample.png", ExternalStorageBase -> "AmazonS3"]Using the syntax filedestination produces the same result:
ExternalStorageUpload["ExampleData/spikey2.png" -> "wolfram-bucket/spikeyExample.png", ExternalStorageBase -> "AmazonS3"]Upload a file to a specific path in an Amazon S3 bucket by providing the Amazon S3 URI:
ExternalStorageUpload["ExampleData/spikey2.png", "s3://wolfram-bucket/spikeyExample.png", ExternalStorageBase -> "AmazonS3"]Multiple Files (2)
Upload multiple files to an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "spikey2.png", "turtle.jpg"};ExternalStorageUpload[files, "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Using the syntax {file1,file2,…}destination produces the same result:
ExternalStorageUpload[files -> "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Upload multiple files to specific destinations in an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "photo.jpg", "turtle.jpg"};destinations = Table[StringRiffle[{"wolfram-bucket", "jpgFiles", "image" <> ToString[i] <> ".jpg"}, "/"], {i, 1, 3}];ExternalStorageUpload[files, destinations, ExternalStorageBase -> "AmazonS3"]Using the syntax {file1,file2,…}{dest1,dest2,…} produces the same result:
ExternalStorageUpload[files -> destinations, ExternalStorageBase -> "AmazonS3"]Providing a list of rules as first argument also uploads the files to the specified destinations:
rules = MapThread[Rule, {files, destinations}]ExternalStorageUpload[rules, ExternalStorageBase -> "AmazonS3"]Options (7)
ExternalStorageBase (6)
Amazon S3 (4)
Upload a file to an Amazon S3 bucket:
ExternalStorageUpload["ExampleData/spikey2.png", "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Upload a file to a specific path in an Amazon S3 bucket:
ExternalStorageUpload["ExampleData/spikey2.png", "wolfram-bucket/spikeyExample.png", ExternalStorageBase -> "AmazonS3"]Upload multiple files to an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "spikey2.png", "turtle.jpg"};ExternalStorageUpload[files, "wolfram-bucket", ExternalStorageBase -> "AmazonS3"]Upload multiple files to specific destinations in an Amazon S3 bucket:
files = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", #}]& /@ {"coneflower.jpg", "photo.jpg", "turtle.jpg"};destinations = Table[StringRiffle[{"wolfram-bucket", "jpgFiles", "image" <> ToString[i] <> ".jpg"}, "/"], {i, 1, 3}];ExternalStorageUpload[files, destinations, ExternalStorageBase -> "AmazonS3"]Dropbox (1)
IPFS (1)
Upload a file to the InterPlanetary File System (IPFS). IPFS does not require a target path because files in that system are identified by a content identifier (CID) that is automatically provided:
ExternalStorageUpload["ExampleData/spikey2.png", ExternalStorageBase -> "IPFS"]OverwriteTarget (1)
By default, ExternalStorageUpload does not overwrite a file if a different file is uploaded to an existing path. Upload a new file:
file1 = "ExampleData/spikey2.png";ExternalStorageUpload[file1, "NonExistentFolderX77/spikey.png", ExternalStorageBase -> "Dropbox"]Upload a new file to the same path:
file2 = "ExampleData/glasses.png";ExternalStorageUpload[file2, "NonExistentFolderX77/spikey.png", ExternalStorageBase -> "Dropbox"]%["Path"]By setting the OverwriteTarget option to True, the target file will be replaced:
ExternalStorageUpload[file2, "NonExistentFolderX77/spikey.png", ExternalStorageBase -> "Dropbox", OverwriteTarget -> True]%["Path"]Properties & Relations (2)
The ExternalStorageBase option can use a ServiceObject as a value, from an already created connection:
dropbox = ServiceConnect["Dropbox"]ExternalStorageUpload["ExampleData/spikey2.png", ExternalStorageBase -> dropbox]CopyFile also supports an ExternalStorageObject as a file specification to upload a local file to an external storage service:
eso = ExternalStorageObject[]CopyFile["ExampleData/spikey2.png", eso]Possible Issues (1)
IPFS manages the content identifier (CID):
obj = ExternalStorageUpload["ExampleData/spikey2.png"]With IPFS, you cannot upload to a specific ExternalStorageObject:
ExternalStorageUpload["ExampleData/spikey2.png", obj]Related Guides
Text
Wolfram Research (2020), ExternalStorageUpload, Wolfram Language function, https://reference.wolfram.com/language/ref/ExternalStorageUpload.html (updated 2021).
CMS
Wolfram Language. 2020. "ExternalStorageUpload." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ExternalStorageUpload.html.
APA
Wolfram Language. (2020). ExternalStorageUpload. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExternalStorageUpload.html
BibTeX
@misc{reference.wolfram_2026_externalstorageupload, author="Wolfram Research", title="{ExternalStorageUpload}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ExternalStorageUpload.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_externalstorageupload, organization={Wolfram Research}, title={ExternalStorageUpload}, year={2021}, url={https://reference.wolfram.com/language/ref/ExternalStorageUpload.html}, note=[Accessed: 13-June-2026]}