slopus--happy
98e40dac97
CLI Smoke Test / smoke-test-linux (20) (push) Has been cancelled
CLI Smoke Test / smoke-test-linux (24) (push) Has been cancelled
CLI Smoke Test / smoke-test-windows (20) (push) Has been cancelled
CLI Smoke Test / smoke-test-windows (24) (push) Has been cancelled
Expo App TypeScript typecheck / typecheck (push) Has been cancelled
15 行
423 B
TypeScript
15 行
423 B
TypeScript
/**
|
|
* Web impl: real Blob constructor works, no temp file needed.
|
|
*/
|
|
export async function appendFormFile(
|
|
formData: FormData,
|
|
bytes: Uint8Array,
|
|
field: string,
|
|
filename: string,
|
|
contentType: string,
|
|
): Promise<() => Promise<void>> {
|
|
const blob = new Blob([bytes.buffer as ArrayBuffer], { type: contentType });
|
|
formData.append(field, blob, filename);
|
|
return async () => { /* no-op */ };
|
|
}
|