barryf / micropublish

A Micropub client that you can use to create, update, delete and undelete content on your Micropub-enabled website.
https://micropublish.net
MIT License
68 stars 16 forks source link

feat: media upload #91

Closed hacdias closed 2 years ago

hacdias commented 2 years ago

Closes #40.

This adds an upload button to the photo field. Then, it'll use the user's media endpoint to upload the photo and fill the field. Multiple pictures can be uploaded. Then they will be separated by \n.

The button only shows if the media endpoint exists and if JavaScript is enabled.

PS: never wrote Ruby before so I'm not sure if I handled the situation the best.

hacdias commented 2 years ago

@barryf just fixed the conflicts.

hacdias commented 2 years ago

@barryf is there any chance this can be merged soon? Or do you have plans to implement this in a different way? 😀

jamietanna commented 2 years ago

I can't seem to see how this is triggered - when going to i.e. http://localhost:9292/new/h-entry/photo there's no upload form?

As an aside, there are a few other options in the meantime like https://micropub-media-endpoint-proxy.netlify.app/ while we get this PR sorted :+1:

barryf commented 2 years ago

Thanks @hacdias, I'm sorry this PR is outstanding. I had difficulty testing - I don't have a way of testing media uploads and need to re-read the spec to check what should be happening. I'll see if I can review this weekend.