Skip to content

Commit

Permalink
fix(local): video file thumbnails not displaying on iOS Safari (Alist…
Browse files Browse the repository at this point in the history
…Go#5420)

* perf(webdav): support for cookies on webdav drive

* fix(local): video file thumbnails not displaying on iOS Safari
  • Loading branch information
gmugu authored Nov 18, 2023
1 parent 6fc6751 commit 867acca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/common/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
if link.MFile != nil {
defer link.MFile.Close()
attachFileName(w, file)
contentType := link.Header.Get("Content-Type")
if contentType != "" {
w.Header().Add("Content-Type", contentType)
}
http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile)
return nil
} else if link.RangeReadCloser != nil {
Expand Down

0 comments on commit 867acca

Please sign in to comment.