Pages: [1]
  Print  
Author Topic: Which error when downloaded file is too big?  (Read 6513 times)
0 Members and 1 Guest are viewing this topic.
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« on: 25 July , 2008, 06:25:22 »

Hi,

just a quick question: when I try to download a file that is too big for the available memory, which klError code is returned? From Wiki I see "-6: Given data is out of range": does it refer to this?

Also, is the size-check done before download is started (if content-length header is available, of course), or KuneriLite just tries to download it, and returns an error when no more space is available?

Thanks!
Pit
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #1 on: 27 July , 2008, 03:43:56 »

Hi,
I updated the wiki ul/dl plugin: -4 is the error for "too big file".

Basically there is no check for certain limit, if there is no memory for transfer -4 is returned, it depends of amount of free memory, which varies.

Cheers,
Jukka
Logged
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« Reply #2 on: 28 July , 2008, 03:21:59 »

Thanks Jukka! This is exactly what I need Smiley

Cheers,
Pit
Logged
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« Reply #3 on: 30 July , 2008, 09:26:48 »

Hi Jukka,

about the download of big files, I've done some more tests.

I've tried to download a file, bigger than the available memory, on a Nokia N82. The download correctly starts, without giving any errors, but then, during download, I got this:

* 2 system error popups telling that memory is not enough to save content and that is necessary to delete some data on phone itself
* after those system 2 popups, I get a -26 klError from status command

So, my questions are:

* do you think it could be possible to avoid those 2 system popups?
* is there currently any way to check available space on phone/external memory (so, to try to prevent this issue)?

Thanks,
Pit
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #4 on: 30 July , 2008, 11:36:27 »

Hi Alessandro!

Interesting, but seems to be logical that operating system reports of low disk space (-26 = Symbian error KErrDiskFull). I don't think it can be avoided.

Flash Lite has this fscommand2("GetFreePlayerMemory"), but for disk space I don't think there is a way?
But for KuneriLite, that would be useful addition. Goes to to-do list! Wink

Cheers,
Jukka
Logged
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« Reply #5 on: 31 July , 2008, 04:36:41 »

Thanks for reply Jukka!

Would be great to see such an addition to KuneriLite (since download is - to me - one of the most useful plugins Smiley)

Cheers,
Pit
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #6 on: 31 July , 2008, 06:01:04 »

Hey Ale, is there any way to detect the file size before downloading in practice?

cheers,

Ugur.-
Logged

Kuneri Support Team
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« Reply #7 on: 01 August , 2008, 04:12:24 »

Hi Ugur,

well, afaik, there's not a universal solution to this:

* sometimes the Content-Length header is available, and it this cases KuneriLite itself could do a check to see if available space is enough to save the file itself.

* when the Content-Length header is not available, only thing that KuneriLite could do is, afaik, starting to save the file and then raising an error when no more space is available (so: status command should return a non-zero klError). Right now it works exactly this way, but with 2 Symbian native popups showing up too.
Anyway, in this last case, an availableSpace command would be useful, since the FlashLite app itself could programmatically get the available space on the device and, retrieving the filesize in some alternative way (e.g.: explicitly asking the server for it), could decide to start the download or not.

What do you think about it?

Pit
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #8 on: 06 August , 2008, 00:25:50 »

KuneriLite 0.9.7 checks internally remaining disk space for operation, when needed. Checks also Content-length header, when it is available.

"get available disk space" command is not yet there, though.
Logged
jappit
Global Moderator
Jr. Member
*****
Posts: 88



WWW
« Reply #9 on: 06 August , 2008, 10:26:39 »

Great news! I'll give it a try immediatly Smiley

Thanks,
Pit
Logged
Pages: [1]
  Print  
 
Jump to: