BookBrowser icon indicating copy to clipboard operation
BookBrowser copied to clipboard

Upload books

Open ghost opened this issue 8 years ago • 9 comments

Hi,

Thanks for your work, I tried the demo and it seems pretty solid. The only thing I didn't find which I would love to have on this kind of an ebook server (hosted remotely) is a way to upload books (instead of having to transfer them to the server's folders). This is more of an enhancement request. Do you plan to add a way to upload books any time soon ?

ghost avatar Sep 27 '17 18:09 ghost

Yes, it is planned. I actually have started working on it. I have already implemented refreshing the index dynamically. All I have left is to add the upload page and user management. I have been busy recently, so I cannot get to it right now, but I will be working on this more soon.

pgaskin avatar Sep 28 '17 00:09 pgaskin

How would you be thinking of uploading books? WebDAV? An upload page?

Also, how would you want authentication to work? Single user? Password? Multiple users?

pgaskin avatar Oct 17 '17 11:10 pgaskin

Hi, thanks for your answer, I was not even thinking about user management as I was imagining using this for myself, with an IP check of sorts, or htaccess password. An upload page would definetly do the job ^^

badaz avatar Oct 17 '17 14:10 badaz

How about a HTTP header with an Authorization token. You would be able to pass it with htaccess, and it would still be secure without another reverse proxy. Does that sound good?

Also, where would the files be put? The books dir? Somewhere else?

Btw, what is @badaz and @badasve

pgaskin avatar Oct 17 '17 14:10 pgaskin

If you want my opinion about authorization / authentication I'd say that the best system would be a user authentication system and a rights system for authorization, whatever the implementation, but then you need a db. So if such a system does not exist in the code maybe you should leave the decision to use a reverse proxy / htaccess to the dev installing your server on their machine instead of implementing a headers system, and add a way to disable uploading books for people who already use your solution on public servers for reading purposes only (using a config file of sorts). But this is just my opinion !

As for the files, I'd put them in the books dir yes.

About @badasve @badaz : I have two github accounts and I never know which one I'm using :)

badaz avatar Oct 17 '17 14:10 badaz

#23

pgaskin avatar Oct 18 '17 19:10 pgaskin

I've decided against this for now. BookBrowser is meant to be read-only, and not a complete management tool. For uploading, another application can upload the books, then send SIGUSR1 to BookBrowser to refresh it.

The most I may do in the future is support JWT tokens for uploading from the command line. The secret would be specified as an environment variable or on the command line.

pgaskin avatar Apr 03 '18 19:04 pgaskin

Ok no pb I can see your point. Thanks for looking into it anyway.

badaz avatar Apr 03 '18 21:04 badaz

@badaz No problem. I am actually on the fence about this one. I may end up implementing this after I finish some larger changes I am working on right now.

pgaskin avatar Apr 03 '18 21:04 pgaskin