Skip to main content
Version: 1.x.x

Blob API

quip.apps.Blob.prototype

getId

Function() => string | undefined

Returns the ID for this Blob. If this Blob has not yet been stored to Quip, this will return undefined.

hasLoadedData

Function() => boolean

Returns whether or not the data for this Blob has been loaded.

onDataLoaded

Function(
loadedCallback: (blob: Blob) => void,
loadErrorCallback?: (blob: Blob) => void
) => blob

Schedules a callback function that will be triggered when the data for this Blob has been loaded from Quip. If the data has already been loaded, loadedCallback will be triggered immediately. Also takes an optional loadErrorCallback that will be triggered if an error is encountered when trying to perform the load.

getData

Function() => ArrayBuffer | undefined

Returns the data for this Blob. If the data hasn't been loaded yet, this will return undefined.

url

Function() => string | undefined

Returns the URL for this Blob. If the Blob has not been loaded yet, this will return undefined.

getFilename

Function() => string | undefined

Returns the filename associated with this Blob. If the Blob has not been loaded yet, this will return undefined.

downloadAsFile

Function() => void

Triggers a download in the browser for the contents of this Blob, as a file.

openInLightbox

Function() => void

Triggers the host document to open the given Blob in a lightbox. Only supported for Blobs containing image data.