fix thumbnails for empty trailing paths

This commit is contained in:
Michael Barz
2022-05-12 18:36:12 +02:00
parent 2586682ae0
commit eb07e056e6
3 changed files with 14 additions and 8 deletions
@@ -1,7 +1,6 @@
package requests
import (
"errors"
"fmt"
"net/http"
"net/url"
@@ -43,9 +42,6 @@ func ParseThumbnailRequest(r *http.Request) (*ThumbnailRequest, error) {
ctx := r.Context()
fp := ctx.Value(constants.ContextKeyPath).(string)
if fp == "" {
return nil, errors.New("invalid file path")
}
id := ""
v := ctx.Value(constants.ContextKeyID)