social icon indicating copy to clipboard operation
social copied to clipboard

Add support for gif attachment

Open StCyr opened this issue 5 years ago • 2 comments

Support for images has been added with https://github.com/nextcloud/social/pull/626

We should add support for gif

StCyr avatar Jan 09 '20 08:01 StCyr

Just need to edit mime types some where to add MIME Image/Gif, if someone could point to where that is please. I might dig around later.

v0idkr4ft avatar Dec 03 '20 11:12 v0idkr4ft

Ok did some digging around. GIF mime type is enabled, but mastodon turns gifs into mp4's it appears after inspecting them from mastodon.social so the MIME type would be video/mp4 if Social is receiving them as mp4 and not gifs we'd need a different function as the save to cache and resize function that's being done may only work for image and not video. at least it didn't work when i tried. it also might just not work for gifs and will need to define another exception/function for them. but may poke around some more when i has the time. file where mime types are set is in apps/social/lib/Service/CacheDocumentService.php

196 public function filterMimeTypes(string $mime) {
197  
198 $allowedMimeType = [
199 'image/jpeg',
200 'image/gif',
201 'image/png'

v0idkr4ft avatar Dec 04 '20 03:12 v0idkr4ft