a5storage_getitem_as_blob Function
Syntax
Arguments
- connectionStringCharacter
Storage connection string with ::storage:: as a prefix.
- itemNameCharacter
The name of the item to fetch.
- pResultPointer
An optional dot variable that you can pass in that will be populated with information about the object.
Returns
- blobBinary
Returns the data downloaded from the item in storage.
Description
Retrieves data from an item in storage, including files stored in Amazon S3 or Azure, and puts the data in a blob variable. Alternatively, use the a5storage_getItem_as_blob2(), function which returns a CallResult object. The advantage of returning a CallResult is that if there is an error (such as object not found), the callResult object will indicate that there was an error and will show information about the error. If there is no error, the CallResult's ReturnDataValue property will have the blob data. When using a5storage_getItem_as_blob(), if the object is not found, an empty blob is returned.
Example
dim b3 as b dim p3 as p b3 = a5Storage_getItem_as_blob("::storage::Amazon_East","movies/4290.jpg",p3) ?b3.size() ?p3 = contentType = "image/jpeg" timeTakenMilliseconds = 297
To send the file to the client from an Ajax Callback, see a5Helper_generateFileDownloadJS Function. See also Context.Response.SendFile.
See Also