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.
Thanks!!
Removing that line helped, although i used another helper found here http://marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/
I did use the same uploader class as Marc, and your solution has worked. Many thanks… :)
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.
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!