Home > flex > Multipart form data in flash

Multipart form data in flash

Eugene has a handy MultipartURLLoader class to do the leg work of sending multipart form data from flash.

Note that because it uses:
urlRequest.requestHeaders.push( new URLRequestHeader( ‘Cache-Control’, ‘no-cache’ ) );

You may get SecurityError:
Error #2044: Unhandled securityError:. text=Error #2170: Security sandbox violation: http://domain1.com/your.swf cannot send HTTP headers to http://domain2.com/yourscript.php.

You may need to add a variation of <allow-http-request-headers-from domain=”*” headers=”*”/>  to your crossdomain.xml file or comment out that line. I chose the latter as I don’t think its neccessary in a POST call.

Categories: flex Tags:
  1. Marc
    February 24th, 2011 at 12:34 | #1
  2. Ça?atay
    June 23rd, 2011 at 00:54 | #2

    I did use the same uploader class as Marc, and your solution has worked. Many thanks… :)

  3. November 1st, 2011 at 01:05 | #3

    I’m so excited that you guys will be coming to Penn State! You are all amazing on stage and I can’t wait to see you live again! I’m 30 mins away from there, so I can recommend some great dive bars with yummy food.

  4. November 4th, 2011 at 16:47 | #4

    wonderful publish, very informative. I wonder why the other specialists of this sector don’t understand this. You should continue your writing. I am confident, you’ve a great readers’ base already!

  5. November 18th, 2011 at 06:33 | #5

    My wife and i got absolutely joyful Ervin managed to round up his preliminary research because of the ideas he made out of the web page. It’s not at all simplistic just to find yourself giving for free information and facts which many others have been selling. So we remember we now have you to give thanks to for this. Most of the illustrations you have made, the easy web site navigation, the relationships your site assist to promote – it is all fantastic, and it’s aiding our son and the family know that the subject is enjoyable, and that is exceptionally vital. Thanks for everything!

  1. March 11th, 2009 at 03:29 | #1