Alessio Caiazza

Media endpoint should allow async processing

Micropub specs allows for a 202 Accepted answer for creating a new h-entry, as explained in 3.3.6 Response:

If the endpoint chooses to process the request asynchronously rather than creating and storing the post immediately, it MUST return an HTTP 202 Accepted status code, and MUST also return the Location header.

But the Media Endpoint only allows for a 201 Created answer, as explained in 3.6.4 Response.

I propose we extend the usage of 202 Accepted to the media endpoint to make static site generators compliant with the spec.

Just to give an example of my setup: my blog is statically generated in CI, and my micropub server is a stateless container that converts incoming requests into git commits, those commits in turn triggers my CI and the blog is published.

With such enviroment it will be not possible to make the image immediately available.

(l0g.in 5EKG00)

This post accepts webmentions. Do you have the URL to your post?

Manton Reece

from Manton Reece
I wonder if not allowing `202` in the spec was intentional. For example, I can image an app that would upload a photo and then need to show a preview with that URL right away, or download the URL to get other info such as final dimensions if the server resized it. (This doesn't affect me, so I don't want to make too big a deal about it… Mostly curious.)