silverwind / droppy

**ARCHIVED** Self-hosted file storage
BSD 2-Clause "Simplified" License
1.62k stars 195 forks source link

[Request] thumbnails #351

Open andykais opened 6 years ago

andykais commented 6 years ago

Hi, curious if thumbnails are in the works for videos, images, pdfs, etc. In a lot of cases, they can be generated using plain javascript video-thumbnail, image-thumbnail

silverwind commented 6 years ago

I don't think generating them client-side is a good idea as one would have to transfer full images which can result in a lot of bandwidth usage. They should be pre-generated asynchronously on the server, ideally in second process.

akzkak commented 5 years ago

Very nice work with droppy, silverwind!

What about thumbnails when posting link to Messenger, Discord etc? Would be a great to see.

silverwind commented 5 years ago

What about thumbnails when posting link to Messenger, Discord etc?

That's should already work because all data links are direct links. You may have to enable the linkExtensions option for shared image links to work in applications that only parse the URL.

akzkak commented 5 years ago

That's should already work because all data links are direct links. You may have to enable the linkExtensions option for shared image links to work in applications that only parse the URL.

Oh ye sorry. Do work for pictures both with and without linkExtensions, but not videos.

Maybe make it an option for those that do not care about the extra bandwidth usage.

silverwind commented 5 years ago

There is nothing I can do on my side except making sure the file is served with the correct mime type and the URL looks like it's a direct link. I guess most of these preview functions only work for a hardcoded list of pre-defined sites. If you observe any issues with the mime types droppy serves, I can do something about that (video mime types are often not well-defined).

silverwind commented 5 years ago

On second thought, I suspect some of these apps might be doing HEAD requests, I added support for them now. Try again in the next release.

akzkak commented 5 years ago

Cool. Did wonder how Google managed to do it on YouTube, but just guessed that was part of there video processing to optimize, save space and perhaps extract thumbnails etc etc.

Ill give the HEAD requests a go on next release. Thanks

akzkak commented 5 years ago

Updated to v10.0.11, but no luck, still no thumbnail. Did check "About" section to make sure it had updated. Tested on Messenger and Discord with and without linkExtensions enabled. Thanks for the try though.

silverwind commented 5 years ago

Then it's most likely Discord using a hardcoded list of domains I guess. Maybe I'll try later myself.