Mobileread
Force download for large file size
#1  nucky 06-24-2020, 03:21 PM
Is it possible to force downloading books/comics that exceed a certain file size on the server instead of allowing online reading? I have some fairly large comics with file sizes above 1GB which simply doesn't work for online reading and causes problems because the caches reach their quotas.
For people who don't know how to clear the cache it can be really irritating because they're unable to read anything else online.

On a side note, I've been struggling to display the file size in a human readable format. I tried using the human-readable template function to display the file size for those files, but it always displays the same string.
Shouldn't it work by using?:
Code
Size: {size:human_readable()}
Reply 

#2  gbm 06-24-2020, 05:08 PM
Quote nucky
Is it possible to force downloading books/comics that exceed a certain file size on the server instead of allowing online reading? I have some fairly large comics with file sizes above 1GB which simply doesn't work for online reading and causes problems because the caches reach their quotas.
For people who don't know how to clear the cache it can be really irritating because they're unable to read anything else online.

On a side note, I've been struggling to display the file size in a human readable format. I tried using the human-readable template function to display the file size for those files, but it always displays the same string.
Shouldn't it work by using?:
Code
Size: {size:human_readable()}
Click on the format--see screenshots--you will get a pop up asking what you want to do. Mouse over download in the pop up will get file size.

bernie

Edit:
How to increase browser cache size

Quote
Follow the steps below to increase the browser cache size in several of the common browsers you may be using.
Screenshot from 2020-06-24 16-59-58.png Screenshot from 2020-06-24 17-05-16.png Screenshot from 2020-06-24 17-02-53.png 
Reply 

#3  chaley 06-25-2020, 04:48 AM
Quote nucky
On a side note, I've been struggling to display the file size in a human readable format. I tried using the human-readable template function to display the file size for those files, but it always displays the same string.
Shouldn't it work by using?:
Code
Size: {size:human_readable()}
For various reasons "size" doesn't work in templates. Use
Code
{:'human_readable(booksize())'}
instead
Reply 

Today's Posts | Search this Thread | Login | Register