method
RiduClient.upload
Upload a Blob with optional typed metadata.
Arguments
| Argument | Type | Description |
|---|---|---|
collection | Slug | The collection value. |
file | Blob | The file value. |
options | (UploadOptions< | The options value. |
Returns
The declared result.
Promise<OutputFor<Config, Slug>>Full signature (2 overloads)
RiduClient.upload<Slug extends Extract<UploadCollectionSlug<Config>, DraftCollectionSlug<Config>>>(
collection: Slug,
file: Blob,
options?: UploadOptions<
DraftCreateFor<Config, Slug>,
LocaleFor<Config>,
true,
> & {
draft?: true
},
): Promise<OutputFor<Config, Slug>>
RiduClient.upload<Slug extends UploadCollectionSlug<Config>>(
collection: Slug,
file: Blob,
...args: CompleteUploadArgs<
CreateFor<Config, Slug>,
LocaleFor<Config>,
CollectionDraftsFor<Config, Slug>,
>,
): Promise<OutputFor<Config, Slug>>Related types
UploadCollectionSlugCollection slugs with the generated upload capability.
DraftCollectionSlugCollection slugs with the generated drafts capability.
UploadOptionsMetadata and locale options accompanying an upload.
DraftCreateForGenerated input for creating an incomplete draft-capable document.
OutputForResolve a collection document output type.
CreateForResolve a collection create input type.