Constructors
constructor
- new BlobApi(options): BlobApi
Parameters
- options: {
blobStore: BlobStore;
getMediaBaseUrl: (() => Promise<string>);
}getMediaBaseUrl: (() => Promise<string>)
- (): Promise<string>
Returns Promise<string>
Methods
create
- create(filepaths, metadata): Promise<{
driveId: string;
hash: string;
name: string;
type: "photo" | "video" | "audio";
}> Parameters
- filepaths: {
original: string;
preview?: string;
thumbnail?: string;
}original: string
Optional
preview?: string
Optional
thumbnail?: string
- metadata: Metadata
Returns Promise<{
driveId: string;
hash: string;
name: string;
type: "photo" | "video" | "audio";
}>
getUrl
- getUrl(blobId): Promise<string>
Returns Promise<string>
Write blobs for provided variants of a file