Pages: [1] 2
  Print  
Author Topic: [Solved] Max size for WRITE  (Read 18211 times)
0 Members and 1 Guest are viewing this topic.
netsoul
Jr. Member
**
Posts: 57



WWW
« on: 04 February , 2008, 06:33:16 »

Hi again,

Are there any limitation of maximal size of string in the command 'write' for File plugin? It looks like it works with maximal string length about 700 bytes on my N95. The larger strings invoke a crash of application.

-Alex
« Last Edit: 09 June , 2008, 07:53:35 by jusahama » Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #1 on: 04 February , 2008, 07:25:02 »

I guess, this's a limitation of GET request.
... is it possible, to define a variable's name in the request, and server will read the variable value from the clip directly, to write to a file?
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #2 on: 04 February , 2008, 08:21:32 »

Hi,
I think string is klData argument, right?
There are no limits set for it.

Lets me test also this..
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #3 on: 04 February , 2008, 09:36:39 »

I guess, this's a limitation of GET request.

I also would think so.

... is it possible, to define a variable's name in the request, and server will read the variable value from the clip directly, to write to a file?

I think this wouldn't be possible. Read/write is only one direction. If there is a really big chunk of data, I would separate that into pieces and append to a file.

cheers,

Ugur.-
Logged

Kuneri Support Team
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #4 on: 04 February , 2008, 10:58:32 »

Unfortunately, not any data can be splited in Flash. And how much time will be required to write 40Kb and more data by 500 byte pieces?
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #5 on: 04 February , 2008, 12:16:44 »

This must be something else, due I just wrote 2,5K long string in klData into file. Although player was 1.1 and phone E61.
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #6 on: 04 February , 2008, 12:22:12 »

Hmm, might there be restricted characters in the data you are trying to write? For instance, instead of '&' you should use %26. Jukka, is there any list for such data on Wiki?

Ugur.-
Logged

Kuneri Support Team
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #7 on: 04 February , 2008, 12:42:43 »

I use 'escape()' function to encode data before... I'm creating a separate test to investigate it too on my phone.
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #8 on: 04 February , 2008, 12:46:03 »

Hi,
that is not necessary. KL can handle even '&' occurs in between the variables. That has been discussed many times;)

Back to the problem; I think loadVariables cannot handle 40Kb of data at a time, and you should have some kind of sending buffer mechanism in FL side.
Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #9 on: 04 February , 2008, 13:21:39 »

I've just tested klFile plugin on my N95 (FL 2.0 preinstalled) in separate application with a 'clear' text - it allows save 614 bytes of the text with url-encoding. So, to write 40Kb by 600 byte portions, it needs 67 iterations. It isn't a perfect solution, IMHO.
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #10 on: 04 February , 2008, 15:26:40 »

Yes, that's not really reasonable. We did not intentionally limit this, I would guess this would be a FL side problem. We should check this out to be sure though. But in any case, I don't think that loadVariables could handle 60Kb of data at one time.
Logged

Kuneri Support Team
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #11 on: 04 February , 2008, 23:09:03 »

I didn't tried to use loadVariables for loading a great data into FL 2.1, except of loading via socket with help of native BREW extention.

May be any way exists to use POST method to transmit a data to KL server?
Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #12 on: 05 February , 2008, 11:18:19 »

Hi,
even I define POST method in loadVariables, and when I check server side logs, I see that FL uses still sometimes GET method.

It would be great to know the logic it follows..

-jukka

EDIT: Ok, now when I recalled more about this, and the fact that we don't support sending variables in separate header (in POST method), due that might be problematic in some cases.

We'll have some feasibility study about that, if theres any outcome to enable it.

EDIT: Wiki is updated for the POST method usage.
« Last Edit: 21 February , 2008, 02:03:21 by jusahama » Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #13 on: 04 May , 2008, 04:58:09 »

We have new information concerning this.
If you try to add very long strings to loadVariables,
Flash will crash. In such cases we'd suggest to write data in parts or just embed all data in loadVariables.

For instance this will cause Flash to crash if "test" variable is about 1000 bytes:
loadVariables("http://127.0.0.1:1001/Basic/file?klCommand=write&klUrlDecodeOff=1&klPath=test2.txt&klData="+test, "");

but as embedded call, it works when you add about 1000 bytes after klData
loadVariables("http://127.0.0.1:1001/Basic/file?klCommand=write&klUrlDecodeOff=1&klPath=test2.txt&klData=
ABCD1234567...

looks like Flash bug?
Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #14 on: 04 May , 2008, 05:18:08 »

Unfortunately, your solution does not work on my N95-1:
- Adobe Flash CS3 does not crash in simulation
- real device application crashes in the similar way both with included and external variables for loadVariables method.

Alex
Logged
Pages: [1] 2
  Print  
 
Jump to: