Sanity Library Reference Docs
    Preparing search index...

    Type Alias CreateFileImportParamsBeta

    A file import. The client stages the upload, PUTs the bytes straight to storage with a signed URL, and confirms. The Context API never holds the file content.

    type CreateFileImportParams = {
        contentType?: string;
        file: Exclude<UploadBody, NodeJS.ReadableStream>;
        filename: string;
        type: "file";
    }
    Index

    Properties

    contentType?: string
    file: Exclude<UploadBody, NodeJS.ReadableStream>

    Same shapes assets.upload accepts, minus node streams: the bytes go out through fetch, which has no portable stream support.

    filename: string
    type: "file"