Throw proper exception if we can't get the mimetype for a preview. Catch
it later on so we can just return a not found for the preview.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
For legacy reasons we stored all the previews with a png extention.
However we did not put png data in them all the time.
This caused the preview endpoints to always report that a preview is a
png file. Which was a lie.
Since we abstract away from the storage etc in the previewmanager. There
is no need anymore to store them as .png files and instead we can use
the actual file extention.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
If you request a preview of X by Y. And after calculating X and Y are
equal to maxWidth and maxHeight then there is no reason to create a
preview of that size.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fixes#2739
It tries to create an image from an SVG file. Which we don't support. So
this fails and prints an log line. Then we fall back anyways to the 404
and fetch the default icon.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
The owner of a federated file is the federated user. For which we
obviously can't setup a view.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>