ExternalStorageObject

ExternalStorageObject[location]

represents a file stored in an external location.

ExternalStorageObject[assoc]

represents a file stored in an external service specified by the components of the association assoc.

ExternalStorageObject[location,assoc]

represents a file stored in an external location with additional elements given by assoc.

Details

  • An ExternalStorageObject is returned by ExternalStorageUpload and ExternalStoragePut. It is a valid input for ExternalStorageDownload, ExternalStorageGet and CopyFile.
  • Possible forms for location include:
  • "CID"IPFS content identifier (CID)
    "path"path in the external storage service (e.g. Dropbox, Amazon S3)
    "bucket/key"bucket name and key in the external storage service (e.g. Amazon S3)
    "uri"external storage service URI (e.g. Amazon S3 URI)
    {"location1","location2",}list of paths, keys or URIs in the external storage service
  • In ExternalStorageObject[assoc], the association assoc can have elements with the following keys:
  • "CID"InterPlanetary File System (IPFS) content identifier
    "Path"path to the file in the external service or list of paths
    "BucketName"bucket name in the external storage service (e.g. Amazon S3)
    "ExternalStorageBase"external storage service
  • ExternalStorageObject[...]["Properties"] returns the list of all available properties of the external storage object.
  • ExternalStorageObject[...][prop] returns the property prop of the external storage object.
  • Supported properties include:
  • "BucketName"Amazon S3 bucket name
    "CID"InterPlanetary File System (IPFS) content identifier
    "FileHash"hash of the file
    "Path"path to the file in the external storage service
    "ResourceType"type of resource ("SingleFile", "MultipleFiles")
    "Service"external storage service
  • ExternalStorageObject creates a reference to a file. The file does not need to exist yet.

Examples

open allclose all

Basic Examples  (4)

Create an ExternalStorageObject using the default $ExternalStorageBase:

Create an ExternalStorageObject by providing an InterPlanetary File System (IPFS) content identifier as location:

Create an ExternalStorageObject by providing a path to a single file in Dropbox and the service represented by the "ExternalStorageBase" value inside the association:

Create an ExternalStorageObject by providing the path to multiple files in an Amazon S3 bucket:

Scope  (6)

Single File  (4)

Create an ExternalStorageObject by providing an InterPlanetary File System (IPFS) content identifier as location:

Create an ExternalStorageObject by providing the path to a single file in Dropbox and the service represented by the "ExternalStorageBase" value inside the association:

Specifying the path as the value of the "Path" key of the association produces the same result:

Create an ExternalStorageObject by providing the path to a single file in an Amazon S3 bucket:

Specifying the path as the value of the "Path" key of the association produces the same result:

Create an ExternalStorageObject by providing an Amazon S3 URI:

Multiple Files  (2)

Create an ExternalStorageObject by providing the path to multiple files in an Amazon S3 bucket:

Specifying the paths as the value of the "Path" key of the association produces the same result:

Create an ExternalStorageObject by providing multiple Amazon S3 URIs associated to a specific bucket:

Applications  (3)

Save a computed value to the InterPlanetary File System (IPFS):

Get an expression stored in the InterPlanetary File System (IPFS):

Download a file from the InterPlanetary File System (IPFS):

Import the downloaded content:

Download multiple files from an Amazon S3 bucket:

Properties & Relations  (11)

CopyFile  (1)

CopyFile also supports an ExternalStorageObject as a file specification to download it to a local path:

Properties  (10)

BucketName  (1)

Get the bucket name of an ExternalStorageObject representing files stored in Amazon S3:

CID  (1)

Get the content identifier of an ExternalStorageObject representing a file stored in IPFS:

FileHash  (1)

Get the file hash of an ExternalStorageObject representing a file stored in IPFS:

Path  (2)

Get the path of an ExternalStorageObject representing a file stored in Dropbox:

Get the paths of multiple files stored in an Amazon S3 bucket:

Properties  (3)

Get the properties of an ExternalStorageObject representing a file stored in IPFS:

Get the properties of an ExternalStorageObject representing a file stored in Dropbox:

Get the properties of an ExternalStorageObject representing files stored in Amazon S3:

ResourceType  (1)

Get the resource type of an ExternalStorageObject:

Service  (1)

Get the external storage service associated to an ExternalStorageObject:

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

Text

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

CMS

Wolfram Language. 2020. "ExternalStorageObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExternalStorageObject.html.

APA

Wolfram Language. (2020). ExternalStorageObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExternalStorageObject.html

BibTeX

@misc{reference.wolfram_2023_externalstorageobject, author="Wolfram Research", title="{ExternalStorageObject}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ExternalStorageObject.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_externalstorageobject, organization={Wolfram Research}, title={ExternalStorageObject}, year={2020}, url={https://reference.wolfram.com/language/ref/ExternalStorageObject.html}, note=[Accessed: 29-March-2024 ]}