CloudObject

CloudObject[]

represents a new anonymous cloud object.

CloudObject["http://"], CloudObject["https://"]

represents a cloud object with a given URI.

CloudObject["user:user/path"]

represents a cloud object of a given user with a given path.

CloudObject["uuid:uuid"]

represents a cloud object identified by a given UUID.

CloudObject["/abspath"]

represents a cloud object of the currently authenticated user at an absolute path.

CloudObject["relpath"]

represents a cloud object of the currently authenticated user at a relative path.

CloudObject["relpath",base]

represents a cloud object with a path relative to the base path base.

Details and Options

  • CloudObject creates a reference to a cloud object identified by a URL. The cloud object does not need to exist yet.
  • Absolute paths are resolved with respect to $CloudRootDirectory. Relative paths are resolved with respect to CloudDirectory.
  • Cloud objects are created in the cloud defined by $CloudBase, except when using CloudObject["http://"] or CloudObject["https://"].
  • CloudObject[URL["loc"]] is also supported.
  • CloudObject allows the following options:
  • AuthenticationAutomaticauthentication provided for access to the object
    AutoCopyFalsewhether to make a copy when opened
    AutoRemoveFalsewhether to schedule the object for deletion
    CachePersistenceAutomaticcontrols the time duration for which the object is cached by a client
    CloudObjectNameFormat$CloudObjectNameFormatformat to use for the name portion of the URL
    CloudObjectURLType$CloudObjectURLTypebase type of URL to use (obj, env, ...)
    EvaluationPrivilegesAutomaticprivileges of evaluations by the object
    IconRules{}icons for the object in different deployments
    MetaInformation{}rules giving metainformation
    Permissions$Permissionspermissions for access etc.
    SourceLink$SourceLinkobject to be linked as the source
  • Options[CloudObject[],] gives the current options of a previously created CloudObject. SetOptions can be used to reset them.
  • DeleteObject[CloudObject[]] removes a CloudObject.
  • If a cloud object directory contains an object named either index.html or index.nb, it will be served when users visit the address of the directory. If both an index.html and index.nb object are present in the directory, the index.html will be used.
  • Information of a CloudObject may include the following properties:
  • "UUID"UUID of the cloud object
    "Path"named object path or None (if anonymous)
    "DisplayName"display name for cloud object
    "OwnerCloudUserUUID"cloud user UUID for object owner
    "OwnerCloudUserID"cloud user ID for object owner
    "MIMEType"application MIME type
    "FileType"file type
    "FileByteCount"file size in bytes
    "FileHashMD5"MD5 hash
    "Created"creation date
    "LastAccessed"access date
    "LastModified"modification date
    "Permissions"permission rules
    "Active"whether the object is active

Examples

open allclose all

Basic Examples  (3)

Create a reference to a new, unnamed cloud object:

Refer to a named cloud object with an absolute path:

Refer to a named cloud object with a relative path:

Refer to a named object inside a base directory:

Refer to a named cloud object owned by a specific user:

Refer to a named cloud object in a subdirectory of the user's directory in the cloud:

Save a computed value in a cloud object:

Read an expression stored in a cloud object:

Remove the cloud object:

An unnamed directory object with index object:

The index page will be served when visiting the directory object:

Options  (11)

AutoCopy  (2)

Deploy a public notebook to a named cloud object:

Set the AutoCopy option to True:

Use CloudPublish to automatically set the option to True:

CachePersistence  (1)

Export a plot as an image that will be cached in the browser for a day:

CloudObjectNameFormat  (1)

Generate a reference to an object using the current $CloudUserUUID:

Generate a reference to an object using the current $CloudUserID:

AutoRemove  (1)

Save a computed value in a temporary object:

CloudObjectURLType  (1)

Generate a reference to an object that will take the user to the editing environment:

IconRules  (1)

Set a custom icon that will appear in the Wolfram Cloud mobile application:

MetaInformation  (1)

Add metadata to an object after exporting it to the cloud:

Permissions  (1)

Copy a file to the cloud and make it public:

SharingList  (1)

Share an object with another user:

The user is added to the SharingList option of the CloudObject:

SourceLink  (1)

Set a reference to the source of an object:

Properties & Relations  (2)

Relative paths are resolved with respect to CloudDirectory:

The cloud object is created under the "mydir" directory:

Cloud objects with an absolute path are still created under $CloudRootDirectory:

LocalObject is used for local persistent storage:

Possible Issues  (1)

Applying CloudObject itself does not create an actual object in the cloud; it only refers to an object. So accessing the URL immediately will return a Not Found page:

Only by writing content to the cloud object is it actually created in the cloud:

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

Text

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

CMS

Wolfram Language. 2014. "CloudObject." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/CloudObject.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_cloudobject, organization={Wolfram Research}, title={CloudObject}, year={2020}, url={https://reference.wolfram.com/language/ref/CloudObject.html}, note=[Accessed: 24-November-2024 ]}