pgaskin / BookBrowser

eBook server supporting ePub, MOBI and PDF books.
MIT License
608 stars 111 forks source link

Upload books #16

Open ghost opened 7 years ago

ghost commented 7 years ago

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 ?

pgaskin commented 7 years ago

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 commented 7 years ago

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?

badaz commented 7 years ago

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 ^^

pgaskin commented 7 years ago

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

badaz commented 7 years ago

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 :)

pgaskin commented 7 years ago

23

pgaskin commented 6 years ago

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.

badaz commented 6 years ago

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

pgaskin commented 6 years ago

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