RE: [Flashcoders] Sending Base64 Encoded Data As XML Data

2007-07-12 Thread Paul Steven
Thanks for the advice Johannes

Does that mean my code looks ok to you?




 var dataStrEncoded:String=Base64.Encode(ByteLoader.data);

 var XMLString:String;

 XMLString = ?xml version=\1.0\ encoding=\UTF-8\?;
 XMLString += file;
 XMLString += ![CDATA[ + dataStrEncoded + ]];
 XMLString += dataStrEncoded;
 XMLString += /file;

 loader = new URLLoader();
 loader.addEventListener(Event.COMPLETE, xmlLoaded);

 var request:URLRequest = new URLRequest(ScriptPath);

 request.method = URLRequestMethod.POST;

 var variables:URLVariables = new URLVariables()
 variables.xml = XMLString;

 request.data = variables

 loader.load(request);

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




-- 
j:pn
http://www.memorphic.com/news/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Sending Base64 Encoded Data As XML Data

2007-07-12 Thread Johannes Nel

its simple string concatenation after the base64 encoding, although you
never create a xml object, which makes me wonder why do you not just send
and blob text instead of xml.

On 7/12/07, Paul Steven [EMAIL PROTECTED] wrote:


Thanks for the advice Johannes

Does that mean my code looks ok to you?




 var dataStrEncoded:String=Base64.Encode(ByteLoader.data);

 var XMLString:String;

 XMLString = ?xml version=\1.0\ encoding=\UTF-8\?;
 XMLString += file;
 XMLString += ![CDATA[ + dataStrEncoded + ]];
 XMLString += dataStrEncoded;
 XMLString += /file;

 loader = new URLLoader();
 loader.addEventListener(Event.COMPLETE, xmlLoaded);

 var request:URLRequest = new URLRequest(ScriptPath);

 request.method = URLRequestMethod.POST;

 var variables:URLVariables = new URLVariables()
 variables.xml = XMLString;

 request.data = variables

 loader.load(request);

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




--
j:pn
http://www.memorphic.com/news/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
j:pn
http://www.memorphic.com/news/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Sending Base64 Encoded Data As XML Data

2007-07-11 Thread Paul Steven
I would appreciate if anyone can take a look at this code and let me know if
I am on the right tracks. Basically I am uploading a file to a server by
converting the binary data to Base64 and sending this as xml data.

I am getting an error from the server saying file type is not supported so I
am wondering if my code is correct especially the bit that creates the xml
data to send.

Thanks in advance


var dataStrEncoded:String=Base64.Encode(ByteLoader.data);

var XMLString:String;   

XMLString = ?xml version=\1.0\ encoding=\UTF-8\?;
XMLString += file;
XMLString += ![CDATA[ + dataStrEncoded + ]];
XMLString += dataStrEncoded;
XMLString += /file;

loader = new URLLoader();   
loader.addEventListener(Event.COMPLETE, xmlLoaded);

var request:URLRequest = new URLRequest(ScriptPath);

request.method = URLRequestMethod.POST;

var variables:URLVariables = new URLVariables()
variables.xml = XMLString;

request.data = variables

loader.load(request);

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Sending Base64 Encoded Data As XML Data

2007-07-11 Thread Johannes Nel

some servers have inbuilt max post size limits (which are mostly alterable),
you could be running into that

On 7/11/07, Paul Steven [EMAIL PROTECTED] wrote:


I would appreciate if anyone can take a look at this code and let me know
if
I am on the right tracks. Basically I am uploading a file to a server by
converting the binary data to Base64 and sending this as xml data.

I am getting an error from the server saying file type is not supported so
I
am wondering if my code is correct especially the bit that creates the xml
data to send.

Thanks in advance


var dataStrEncoded:String=Base64.Encode(ByteLoader.data);

var XMLString:String;

XMLString = ?xml version=\1.0\ encoding=\UTF-8\?;
XMLString += file;
XMLString += ![CDATA[ + dataStrEncoded + ]];
XMLString += dataStrEncoded;
XMLString += /file;

loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, xmlLoaded);

var request:URLRequest = new URLRequest(ScriptPath);

request.method = URLRequestMethod.POST;

var variables:URLVariables = new URLVariables()
variables.xml = XMLString;

request.data = variables

loader.load(request);

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
j:pn
http://www.memorphic.com/news/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com