satorumurmur / bibi

Bibi | EPUB Reader on your website.
https://bibi.epub.link
MIT License
843 stars 123 forks source link

is there any way to open the epub files from remote location like s3 server #56

Open techvedikasolutions opened 6 years ago

techvedikasolutions commented 6 years ago

Hi, I need to show epub file in the web site,but we don't have chance to locate the files in bookshelf folder locally.is there any way to open the epub files from s3 remote location.

Any help much appreciate.

Thanks

KitaitiMakoto commented 6 years ago

@techvedikasolutions Hi, Yes, you can do it with some configuration for both BiB/i and S3 bucket.

BiB/i configuration

Edit your preset file(bibi/bib/i/preset/defaults.js) to allow fetching EPUB files from remote servers. Add S3 bucket origin(schema and domain) to Bibi.Preset["trustworthy-origins"] like this:

Bibi.Preset = {
// ...
"trustworthy-origins": ["https://s3-website.us-east-2.amazonaws.com"] // or origin of your custom domain bucket
}

S3 configuration

Set CORS settings to your S3 bucket. See official document for details.

dgg32 commented 5 years ago

Hi, it seems AWS doesn't allow the upload of analytics.js. So I have to remove line 71 in default.js. Now it works. Thank you!

txb2d commented 3 years ago

@techvedikasolutions Hi, Yes, you can do it with some configuration for both BiB/i and S3 bucket.

BiB/i configuration

Edit your preset file(bibi/bib/i/preset/defaults.js) to allow fetching EPUB files from remote servers. Add S3 bucket origin(schema and domain) to Bibi.Preset["trustworthy-origins"] like this:

Bibi.Preset = {
// ...
"trustworthy-origins": ["https://s3-website.us-east-2.amazonaws.com"] // or origin of your custom domain bucket
}

S3 configuration

Set CORS settings to your S3 bucket. See official document for details.

it does not well work!