Creating a Blob
quip.apps.createBlobFromData
Function(data: ArrayBuffer, filename?: string) => quip.apps.Blob
Creates a new Blob instance from the given data. If there’s a filename associated with this data, it can be passed in.
quip.apps.showFilePicker
Function(
onFilesPicked: () => void,
onFilesUploaded: (blobWithThumbnails: BlobWithThumbnails[]) => void,
allowedTypes?: string[],
requestedThumbnailWidths?: number[]
) => void
Sends a message to the host to show a file picker to the user. The callback will be triggered after the file that the user has selected has been successfully uploaded to Quip and can be accessed via URL.
The onFilesPicked
callback will be triggered after the user has selected a file in the picker.
The onFilesUploaded
function that will be triggered after the file the user has selected has been successfully uploaded to Quip and can be accessed via URL.
allowedTypes
is a list of MIME types that the user is allowed to choose from in the file picker
requestedThumbnailWidths
is a list of thumbnail widths for Quip to generate from the selected file. If specified, you must also specify a list of allowedTypes
that only includes image MIME types.
quip.apps.BlobWithThumbnails
An interface wrapping a blob and associated thumbnails.
blob
required
quip.apps.Blob
thumbnails
optional
quip.apps.Blob[]