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 allclose all

Basic Examples  (5)

Upload a file to the InterPlanetary File System (IPFS):

Upload a file to Dropbox:

Upload a file using an ExternalStorageObject as the target:

Upload multiple files to an Amazon S3 bucket:

Upload multiple files to specific destinations in an Amazon S3 bucket:

Scope  (8)

Single File  (6)

Default destination  (1)

Upload a file to Dropbox using the default target path:

Destination specification  (5)

Upload a file to Dropbox specifying the target path:

Upload a file to Dropbox. If the target directory does not exist, it will be created:

Upload a file to an Amazon S3 bucket:

Upload a file to a specific path in an Amazon S3 bucket:

Using the syntax filedestination produces the same result:

Upload a file to a specific path in an Amazon S3 bucket by providing the Amazon S3 URI:

Multiple Files  (2)

Upload multiple files to an Amazon S3 bucket:

Using the syntax {file1,file2,}destination produces the same result:

Upload multiple files to specific destinations in an Amazon S3 bucket:

Using the syntax {file1,file2,}{dest1,dest2,} produces the same result:

Providing a list of rules as first argument also uploads the files to the specified destinations:

Options  (7)

ExternalStorageBase  (6)

Amazon S3  (4)

Upload a file to an Amazon S3 bucket:

Upload a file to a specific path in an Amazon S3 bucket:

Upload multiple files to an Amazon S3 bucket:

Upload multiple files to specific destinations in an Amazon S3 bucket:

Dropbox  (1)

Upload a file to Dropbox:

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:

OverwriteTarget  (1)

By default, ExternalStorageUpload does not overwrite a file if a different file is uploaded to an existing path. Upload a new file:

Upload a new file to the same path:

A new file will be created:

By setting the OverwriteTarget option to True, the target file will be replaced:

Properties & Relations  (2)

The ExternalStorageBase option can use a ServiceObject as a value, from an already created connection:

CopyFile also supports an ExternalStorageObject as a file specification to upload a local file to an external storage service:

Possible Issues  (1)

IPFS manages the content identifier (CID):

With IPFS, you cannot upload to a specific ExternalStorageObject:

Wolfram Research (2020), ExternalStorageUpload, Wolfram Language function, https://reference.wolfram.com/language/ref/ExternalStorageUpload.html.

Text

Wolfram Research (2020), ExternalStorageUpload, Wolfram Language function, https://reference.wolfram.com/language/ref/ExternalStorageUpload.html.

CMS

Wolfram Language. 2020. "ExternalStorageUpload." Wolfram Language & System Documentation Center. Wolfram Research. 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_2024_externalstorageupload, author="Wolfram Research", title="{ExternalStorageUpload}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ExternalStorageUpload.html}", note=[Accessed: 26-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_externalstorageupload, organization={Wolfram Research}, title={ExternalStorageUpload}, year={2020}, url={https://reference.wolfram.com/language/ref/ExternalStorageUpload.html}, note=[Accessed: 26-April-2024 ]}