Class LocalURLContent
Defined in: URLContent.js.
Constructor Attributes | Constructor Name and Description |
---|---|
LocalURLContent(url)
Content read from local data.
|
Method Attributes | Method Name and Description |
---|---|
getBlob(observer)
Returns the blob stored by this content, possibly asynchronously if
observer parameter is given. |
|
Returns the content saved on server.
|
|
getStreamURL(observer)
Retrieves asynchronously an URL of this content usable for JavaScript functions with URL paramater.
|
|
setSavedContent(savedContent)
Sets the content saved on server.
|
|
writeBlob(writeBlobUrl, blobName, observer)
Writes the blob bound to this content with the request matching
writeBlobUrl . |
Class Detail
LocalURLContent(url)
Content read from local data.
Abstract base class for blobs, files, local storage and indexedDB content.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- url
Method Detail
{Blob}
getBlob(observer)
Returns the blob stored by this content, possibly asynchronously if
observer
parameter is given.
- Parameters:
- {{blobReady: function|blobError: function}} observer Optional
- optional observer which blobReady function will be called asynchronously once blob is available.
- Returns:
- {Blob} blob content
{URLContent}
getSavedContent()
Returns the content saved on server.
- Returns:
- {URLContent} content on server or
null
if not saved on server yet
getStreamURL(observer)
Retrieves asynchronously an URL of this content usable for JavaScript functions with URL paramater.
- Parameters:
- {{urlReady: function|urlError: function}} observer
- optional observer
which
urlReady
function will be called asynchronously once URL is available.
setSavedContent(savedContent)
Sets the content saved on server.
- Parameters:
- {URLContent} savedContent
- content on server
{abort: function}
writeBlob(writeBlobUrl, blobName, observer)
Writes the blob bound to this content with the request matching
writeBlobUrl
.
- Parameters:
- {string} writeBlobUrl
- the URL used to save the blob
(containing possibly %s which will be replaced by
blobName
) - {string|[string]} blobName
- the name or path used to save the blob,
or an array of values used to format
writeBlobUrl
including blob name - {blobSaved: function(LocalURLContent|blobName) blobError: function} observer
- called when content is saved or if writing fails
- Returns:
- {abort: function} an object containing
abort
method to abort the write operation