You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be an easy function to call with a file or reference to a file that will upload that file to the Media Endpoint.
It should also integrate with #12 so that you can start uploading files and trigger the Micropub Request and the request will wait until these uploads are complete
3.6.2 Authentication
The Media Endpoint must accept the same access tokens that the Micropub endpoint accepts.
3.6.3 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 may ignore the suggested filename that the client sends.
3.6.4 Response
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.
The Micropub client can then use this URL as the value of e.g. the "photo" property of a Micropub request.
The Media Endpoint may periodically delete files uploaded if they are not used in a Micropub request within a specific amount of time.
3.6.4.1 Media Endpoint Error Response
The Media Endpoint should follow the same conventions for returning error responses as the Micropub endpoint, described in Error Response.
There should be an easy function to call with a file or reference to a file that will upload that file to the Media Endpoint.
It should also integrate with #12 so that you can start uploading files and trigger the Micropub Request and the request will wait until these uploads are complete
3.6.2 Authentication
The Media Endpoint must accept the same access tokens that the Micropub endpoint accepts.
3.6.3 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 may ignore the suggested filename that the client sends.
3.6.4 Response
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.
The Micropub client can then use this URL as the value of e.g. the "photo" property of a Micropub request.
The Media Endpoint may periodically delete files uploaded if they are not used in a Micropub request within a specific amount of time.
3.6.4.1 Media Endpoint Error Response
The Media Endpoint should follow the same conventions for returning error responses as the Micropub endpoint, described in Error Response.
https://micropub.net/draft/#media-endpoint
The text was updated successfully, but these errors were encountered: