fix(local): video file thumbnails not displaying on iOS Safari (#5420)

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

* fix(local): video file thumbnails not displaying on iOS Safari
pull/5554/head
MuGu 2023-11-18 22:36:41 +08:00 committed by GitHub
parent 6fc6751463
commit 867accafd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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 {