seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

FBReader download with wrong filename #520

Open Kuzorra22 opened 1 year ago

Kuzorra22 commented 1 year ago

Hello and a Happy Christmas !

I am using COPS in combination with FBReader. $config['cops_use_url_rewriting'] = "1" is set and when I download a book on my PC or Chrome on my Android mobile, it is downloaded with the correct filename. When I download the same book in FBReader it is downloaded as "fetch.php?....".

What am I doing wrong ?

YOS, Kuzorra

marioscube commented 1 year ago

@Kuzorra22

In the fbreader help I found: FBReader for Android and Windows/Mac/Linux supports a technology named OPDS that allows your reader to connect network e-book catalogues and stores. In the reader, you can browse and search over the network catalogues and download the found books directly.

To download from COPS (Calibre OPDS Php Server) using OPDS connect to COPS from FBreader with the url: http:///cops/feed.php

Kuzorra22 commented 1 year ago

Yes, I know. But fetch.php is managing the download, not feed.php, and the download is ignoring the Content-Disposition in the header. Is that a FBReader issue ?

marioscube commented 1 year ago

@Kuzorra22

I installed FBReader (latest version) on MacOS. I connected FBReader to COPS with http://192.168.1.xxx/cops/feed.php and everything works. [ http://192.168.1.xxx/cops/ worked as well. ]

In COPS I have in config_local.php: $config['cops_use_url_rewriting'] = "0"

Screenshot 2022-12-23 at 13 41 16

Where does it go wrong for you?

Kuzorra22 commented 1 year ago

But then I can only download when using the browser to access files and not view them. In the meantime I edited my config_local, so set the cops_use_url_rewriting to 0 when the client identifies as FBReader and 1 if else.

marioscube commented 1 year ago

@Kuzorra22 So no more errors for you? :-)