mirror of https://github.com/Xhofe/alist
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 Safaripull/5554/head
parent
6fc6751463
commit
867accafd1
|
@ -17,6 +17,10 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
|
||||||
if link.MFile != nil {
|
if link.MFile != nil {
|
||||||
defer link.MFile.Close()
|
defer link.MFile.Close()
|
||||||
attachFileName(w, file)
|
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)
|
http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile)
|
||||||
return nil
|
return nil
|
||||||
} else if link.RangeReadCloser != nil {
|
} else if link.RangeReadCloser != nil {
|
||||||
|
|
Loading…
Reference in New Issue