mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 11:19:39 -06:00
Merge pull request #1791 from owncloud/thumbnails-support-gifs
add support for gifs to the thumbnails service
This commit is contained in:
5
changelog/unreleased/thumbnails-support-gifs.md
Normal file
5
changelog/unreleased/thumbnails-support-gifs.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Generate thumbnails for .gif files
|
||||
|
||||
Added support for gifs to the thumbnails service.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1791
|
||||
@@ -19,7 +19,6 @@ Other free text and markdown formatting can be used elsewhere in the document if
|
||||
|
||||
### [Media Viewer preview not visible for files with .jpeg, .ogg, .webm and .gif formats](https://github.com/owncloud/ocis/issues/1490)
|
||||
- [webUIPreview/imageMediaViewer.feature:136](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L136)
|
||||
- [webUIPreview/imageMediaViewer.feature:145](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L145)
|
||||
- [webUIPreview/imageMediaViewer.feature:154](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L154)
|
||||
|
||||
### [Media viewer previews are not visible in public share](https://github.com/owncloud/ocis/issues/1370)
|
||||
|
||||
@@ -5,6 +5,9 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"image"
|
||||
_ "image/gif" // Import the gif package so that image.Decode can understand gifs
|
||||
_ "image/jpeg" // Import the jpeg package so that image.Decode can understand jpegs
|
||||
_ "image/png" // Import the png package so that image.Decode can understand pngs
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
|
||||
@@ -95,7 +95,7 @@ func extensionToFiletype(ext string) thumbnails.GetRequest_FileType {
|
||||
case "JPG", "PNG":
|
||||
val := thumbnails.GetRequest_FileType_value[ext]
|
||||
return thumbnails.GetRequest_FileType(val)
|
||||
case "JPEG":
|
||||
case "JPEG", "GIF":
|
||||
val := thumbnails.GetRequest_FileType_value["JPG"]
|
||||
return thumbnails.GetRequest_FileType(val)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user