til-schneider / slim-wiki

A slim wiki based on PHP and markdown
MIT License
13 stars 6 forks source link

media support #10

Open cornernote opened 7 years ago

cornernote commented 7 years ago

Hey, very nice app!

Wondering if there is currently a way to upload media? If not, is there any plans for this?

cornernote commented 7 years ago

Perhaps something like this:

https://github.com/Rovak/InlineAttachment

cornernote commented 7 years ago

Scratch that last one...

Maybe something like http://www.dropzonejs.com/ connected directly to s3...

I looked into it, but it wasn't as simple as it initially appears.

til-schneider commented 7 years ago

Yes, I want to include a media upload some time in future. But I would prefer to store the media in the webspace (next to the articles) instead of depending on a third-party service (like Amazon S3).

Dropzone.js is a good hint - thanks for it. But besides the upload itself (which isn't trivial as you said), you also would need some UI for selecting previously uploaded media. All in all it would be a bit of work to include this feature, for which I don't have the time left right now. But contributions are welcome.

cornernote commented 7 years ago

Seems like a lot of work for a whole media manager. I was thinking of something more simple, like the way github lets you paste an image directly into an issue. It then inserts the image markdown placeholder while uploading the image. Reusing the image would be as simple as copying the URL from another page where you used it.

Anyway, food for thought...

til-schneider commented 7 years ago

Wow. Github's behavior is really nice. Much better than the media manager thing of which I thought.

That's some work, too. There are a few things to do under the hood. But it's probably the way I would like to go. Feels very slim ;-)

Thanks for your ideas!

abbychau commented 7 years ago

I have a little comment that selecting previously uploaded media is not necessary as it not only introduces complexity to the create-delete logic but also induces some difficulty of understanding to the front end users.

I think that attachments can be simply stick to an entry as the nature of wiki does expect to have low duplication of content.

in case of a need of shared icons or resources, a manually handled third party service or cdn would be enough.