Object Class
Item Index
Methods
cancelDownload
-
params
Cancels the downloading of the object.
Parameters:
-
params
Object-
[downloadId]
Number optionalThe ID of the download to be cancelled. Optional; if not provided, the last download will be cancelled.
-
Returns:
copyTo
-
params
Copies an object to another container/object.
Note that even though both the target container and the target object parameters are optional, at least one has to be specified.
Parameters:
-
params
Object-
[container]
Container optionalThe target container; defaults to the current container.
-
[containerName]
String optionalThe target container name; defaults to the current container.
-
[name]
String optionalThe target object name. Defaults to the object's own name.
-
success
FunctionCallback to call in case of success. The function receives does not receive any parameters.
-
error
FunctionCallback to call in case of error.
-
Returns:
download
-
params
Initiates the downloading of the object. Returns a download ID number that can be used to cancel the download using the cancelDownload function.
This is an async call that returns the results in a callback.
Parameters:
-
params
Object-
file
Ti.FileThe file into which to download the content of the object.
-
[ifMatch]
String optionalA value for the
If-Match
header defined by RFC-2616. -
[ifNoneMatch]
String optionalA value for the
If-None-Match
header defined by RFC-2616. -
[ifModifiedSince]
String optionalA value for the
If-Modified-Since
header defined by RFC-2616. -
[ifUnmodifiedSince]
String optionalA value for the
If-Unmodified-Since
header defined by RFC-2616. -
[range]
String optionalA value for the
Range
header defined by RFC-2616. Cloud Files does not support the full specification for this header, but basic support is provided. See the Rackspace documentation for more detail. -
success
FunctionCallback to call in case of success.
-
error
FunctionCallback to call in case of error.
-
[progress]
Function optionalCallback to call to report progress. It has a single float parameter between the values 0.0 and 1.0.
-
Returns:
downloadFromCdn
-
params
Initiates the downloading of the object from the CDN network. Before you call this method, you need to make sure that the object's container is CDN enabled and that the module knows about this. See the the isCdnEnabled and getCdnMetadata functions for more detail.
Returns a download ID number that can be used to cancel the download using the cancelDownload function.
Parameters:
-
params
Object-
file
Ti.FileThe file into which to download the content of this object.
-
success
FunctionCallback to call in case of success. The function will receive the downloaded object's metadata as parameter.
-
error
FunctionCallback to call in case of error.
-
[progress]
Function optionalCallback to call to report progress. It has a single float parameter between the values 0.0 and 1.0.
-
Returns:
getMetadata
-
params
Retrieves the metadata associated with this object. This is an async call that returns the results in a callback.
Parameters:
-
params
Object-
success
FunctionCallback to call in case of success.
-
error
FunctionCallback to call in case of error.
-
Returns:
purge
-
params
Purges a CDN object. This is an async call that returns the results in a callback.
Parameters:
-
params
Object-
[emailAddresses]
Array of Strings optionalEmail addresses to send the purge announcement to.
-
success
FunctionCallback to call in case of success.
-
error
FunctionCallback to call in case of error.
-
Returns:
toString
()
String
Returns a string representation of this object.
Returns:
updateMetadata
-
params
Updates the metadata associated with this object. This is an async call that returns the results in a callback.
Note that this function overwrites all existing metadata, including built-in properties such as Delete-At. If you would like to preserve any of these values, query them first and supply them as parameters to this function.
Parameters:
-
params
Object-
[metadata]
Object optionalA dictionary that holds the user-defined metadata as key/value pairs.
-
[deleteAt]
Date optionalThe date after the object should be deleted.
-
[deleteAfter]
Number optionalThe number of seconds after which the object should be deleted.
-
[contentType]
String optionalThe content type of the object.
-
success
FunctionCallback to call in case of success. The function receives does not receive any parameters.
-
error
FunctionCallback to call in case of error.
-
Returns:
Properties
cdnIosUri
String
read-only
The iOS URI of the object if the object's container is CDN enabled as far as the module knows.
Note that the status of the container object in memory does not necessarily reflect the status of the container on the Cloud Files server. See the documentation of the getMetadata and getCdnMetadata methods for more detail on this.
cdnSslUri
String
read-only
The SSL CDN URI of the object if the object's container is CDN enabled as far as the module knows.
Note that the status of the container object in memory does not necessarily reflect the status of the container on the Cloud Files server. See the documentation of the getMetadata and getCdnMetadata methods for more detail on this.
cdnStreamingUri
String
read-only
The streaming URI of the object if the object's container is CDN enabled as far as the module knows.
Note that the status of the container object in memory does not necessarily reflect the status of the container on the Cloud Files server. See the documentation of the getMetadata and getCdnMetadata methods for more detail on this.
cdnUri
String
read-only
The CDN URI of the object if the object's container is CDN enabled as far as the module knows.
Note that the status of the container object in memory does not necessarily reflect the status of the container on the Cloud Files server. See the documentation of the getMetadata and getCdnMetadata methods for more detail on this.
contentType
String
read-only
The content type of the object.
Call the getMetadata function to refresh this property.
deleteAt
NSDate
read-only
The "delete-at" date associated with the object.
Call the getMetadata function to refresh this property.
eTag
String
read-only
The eTag of the object.
Call the getMetadata function to refresh this property.
hash
String
read-only
The hash of the object.
lastModified
Date
read-only
The date and time of last modification.
metadata
Dictionary
read-only
The metadata associated with the object.
Call the getMetadata function to refresh this property.
name
String
read-only
The name of the object.
size
Number
read-only
The size of the object in bytes.