Skip to content
Snippets Groups Projects
Commit 83d80623 authored by Travis Ralston's avatar Travis Ralston
Browse files

Fix pointer problem related to using the wrong error

parent 81226f56
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,9 @@ func ThumbnailMedia(w http.ResponseWriter, r *http.Request, log *logrus.Entry) i
thumb, err := thumbSvc.GetThumbnail(media, width, height, method)
if err != nil {
fstream, err := os.Open(media.Location)
if err != nil {
log.Error("Unexpected error opening media: " + err.Error())
fstream, errF := os.Open(media.Location)
if errF != nil {
log.Error("Unexpected error opening media: " + errF.Error())
return client.InternalServerError("Unexpected Error")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment