cops icon indicating copy to clipboard operation
cops copied to clipboard

FBReader download with wrong filename

Open Kuzorra22 opened this issue 2 years ago • 5 comments

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

Kuzorra22 avatar Dec 22 '22 12:12 Kuzorra22

@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://<local_IP>/cops/feed.php

marioscube avatar Dec 22 '22 22:12 marioscube

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 ?

Kuzorra22 avatar Dec 23 '22 08:12 Kuzorra22

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

marioscube avatar Dec 23 '22 12:12 marioscube

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.

Kuzorra22 avatar Dec 24 '22 10:12 Kuzorra22

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

marioscube avatar Dec 27 '22 18:12 marioscube