Parameters
- input: {
storedSessionUrl?: string;
storedBytesConfirmed?: number;
accessToken: string;
totalBytes: number;
contentType: string;
signal?: AbortSignal;
clearResumableState?: () => Promise<void>;
createSession: () => Promise<
string
| { ok: false; error: PlatformUploadError },
>;
persistNewSession?: (sessionUrl: string) => Promise<void>;
}
Returns Promise<
| { kind: "upload"; session: GoogleResumableUploadSession }
| { kind: "complete"; resourceId: string }
| { kind: "error"; result: { ok: false; error: PlatformUploadError } },
>
Session to upload, completed resource id, or init failure.
Resolves a resumable session from persisted state or by creating a new one.