Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear up language regarding file upload and media endpoint #29

Closed
richardcarls opened this issue Jun 23, 2016 · 5 comments
Closed

Clear up language regarding file upload and media endpoint #29

richardcarls opened this issue Jun 23, 2016 · 5 comments

Comments

@richardcarls
Copy link

I agree with this:

I think any micropub endpoint creating h-entrys should be able to accept media like photo/audio/video as both a multipart-encoded file upload as well as a plain URL. I wouldn't want to require one or the other though. Aaron Parecki 11:52, 4 April 2015 (PDT)

It allows a simple client, like an HTML form posting directly to an endpoint, to trivially support file uploads by posting multipart/form-data exclusively.

On the other hand, a micropub endpoint shouldn't need to be responsible for receiving and processing (and storing) file uploads, when this is already covered by Media Endpoint.

If I'm reading the spec correctly, a micropub endpoint is now required to accept file uploads via multipart. As an aspiring implementer/contributor, this is kind of a turn-off. I would rather deal with uploads separately, or better yet, delegate to some kind of futuristic Media Endpoint service that handles it all for me.

@aaronpk
Copy link
Member

aaronpk commented Jul 5, 2016

@richardcarls Thanks for the note! I agree that a server shouldn't be required to accept file uploads if there is a media endpoint specified. What part of the spec indicated that the endpoint is required to accept file uploads? I am reviewing it and can't find a mention of that. I can make it more explicit that if there is a media endpoint specified, the micropub endpoint doesn't need to handle uploads though.

@richardcarls
Copy link
Author

If a client queries a micropub server and discovers it's not configured with a media endpoint, does it then assume that the server will accept multipart as a fallback?

There are a couple sections on including files for certain properties; explicitly stating "in the absence of a media endpoint, a client [must | may] include files with other properties in a multipart request" would help clear things up.

@aaronpk
Copy link
Member

aaronpk commented Jul 5, 2016

Yes, that's the behavior I would expect. I'll add some language to help clear it up. Thanks!

@richardcarls richardcarls changed the title Remove file upload with Create action, or make optional Clear up language regarding file upload and media endpoint Jul 6, 2016
aaronpk added a commit that referenced this issue Jul 6, 2016
* Clarified requirement of supporting file uploads directly or supporting a Media Endpoint (#29)
* Updated indiewebcamp.com references to indieweb.org due to redirects
* Rename `mp-action` to `action` since updates are only JSON requests (#32)
@aaronpk
Copy link
Member

aaronpk commented Jul 6, 2016

Thanks! This has been addressed in the latest draft. Specifically, http://micropub.net/draft/#uploading-files and http://micropub.net/draft/#conformance-classes If this addresses the issue to your satisfaction would you please close the issue? Thanks!

@richardcarls
Copy link
Author

In addition to specifying multipart/form-data as required in the absence of a media endpoint, I think it would be good to conversely specify x-www-form-urlencoded as required in conjunction with a media endpoint. Currently there's no server requirement stated for supporting good 'ole urlencoded on create.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants