@wordpress/media-utils
Version:
WordPress Media Upload Utils.
20 lines • 813 B
TypeScript
/**
* Internal dependencies
*/
import type { CreateSideloadFile, RestAttachment, SubSizeData } from './types';
/**
* Uploads a file to the server without creating an attachment.
*
* Returns lightweight sub-size data instead of a full attachment.
* The client accumulates these responses and sends them to the
* finalize endpoint.
*
* @param file Media File to Save.
* @param attachmentId Parent attachment ID.
* @param additionalData Additional data to include in the request.
* @param signal Abort signal.
*
* @return Sub-size data for the uploaded file.
*/
export declare function sideloadToServer(file: File, attachmentId: RestAttachment['id'], additionalData?: CreateSideloadFile, signal?: AbortSignal): Promise<SubSizeData>;
//# sourceMappingURL=sideload-to-server.d.ts.map