import type { DeletePost, UploadMedia } from '@jackdbd/micropub/schemas/user-provided-functions'; import type { RouteHandler } from 'fastify'; interface Config { deleteMedia: DeletePost; uploadMedia: UploadMedia; } /** * The role of the Media Endpoint is exclusively to handle file uploads and * return a URL that can be used in a subsequent Micropub request. * * To upload a file to the Media Endpoint, the client sends a * `multipart/form-data` request with one part named `file`. * * The Media Endpoint processes the file upload, storing it in whatever backend * it wishes, and generates a URL to the file. The URL SHOULD be unguessable, * such as using a UUID in the path. * If the request is successful, the endpoint MUST return the URL to the file * that was created in the HTTP Location header, and respond with HTTP 201 * Created. The response body is left undefined. * * @see [Media Endpoint](https://micropub.spec.indieweb.org/#media-endpoint) * @see [Request to the Media Endpoint](https://micropub.spec.indieweb.org/#request) * @see [Response from the Media Endpoint](https://www.w3.org/TR/micropub/#response-3) * @see [Uploading Files](https://micropub.spec.indieweb.org/#uploading-files) */ export declare const defMediaPost: (config: Config) => RouteHandler; export {}; //# sourceMappingURL=media-post.d.ts.map