I'm trying to upload an image to imageshack using flex, but keep getting
<links>
<error id="wrong_file_type">Wrong file type detected for file IMG_00000009.jpg:application/octet-stream</error>
</links>
I've tried changing the mimetype, but nothing seems to quite do it.
Here's what my method looks like:
protected function onUpload(event:MouseEvent):void
{
trace('uploading')
fileRef.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, completeHandler);
var params:URLVariables = new URLVariables();
params.key = key;
var request:URLRequest = new URLRequest("http://www.imageshack.us/upload_api.php");
request.method = URLRequestMethod.POST;
request.data = params;
fileRef.upload(request, "fileupload");
}
Could anyone give me a hand here and tell me what i;m doing wrong? I've looked all around google and here, but can't find any kind of workaround for his in actionscript.
Thanks in advance