Is it possible to set HTTP headers while using SWFUpload? I want to use SWFUpload against a REST endpoint that requires special HTTP headers for authentication. That REST endpoint will also return some JSON that I need to parse in JavaScript. Is there a way to get the result from the HTTP call back in JavaScript?
Thanks,
Zack
Flash Security
There are very very few headers we can set due to Flash Security restrictions. Sorry.
Anything returned from the server is only accepted by Flash if the HTTP response code is 200. This data is stored in a string. You can access it in the uploadSuccess event. You would then need to parse the JSON string into a JavaScript object. Many popular libraries support this. Or you can get the code at the official JSON website.