sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

about webdav service #406

Closed CJSen closed 3 weeks ago

CJSen commented 3 weeks ago

-- dufs version: 0.41.0 When I use Alist to connect to the services provided by dufs, the storage connection method used is webdav. I found that after I clicked download, I failed to trigger the browser's download function correctly, but opened the file in a new tab, such as a txt file(mp3, mp4,pdf and so on).But the storage connection method used is sftp, it is ok.

image

After checking the relevant requests, I found that it was caused these mistakes.

image

I'm using wget can be downloaded normally, but when I access it directly using IP: port/links, I also open a tab instead of downloading. eg: wget 192.168.1.1:5000/books/test.txt It downloads normally. open links:192.168.1.1:5000/books/test.txt in browser, It can't download normally, but opens the file in the browser. If this is normal, please close this issue

sigoden commented 3 weeks ago

This is a feature of modern browsers. They can handle a wide range of file types natively, meaning they can open and display them right within your browser window or a new tab. These file types commonly include: