I have bitmapData. I want to upload it to a server using URLLoader. I tried many ways, but with no result. This is my current code in ActionScript 3:
import flash.net.URLLoader;
import flash.net.URLRequest;
import mx.graphics.codec.JPEGEncoder;
...
var jpg:JPEGEncoder = new JPEGEncoder();
var myBytes:ByteArray = jpg.encode(bitmapData);
var uploader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("uploadFile.php");
request.contentType = "application/octet-stream";
request.data = myBytes;
uploader.load(request);
I take an object bitmapData and encode it to jpg. After that I try to send jpg-bytes to the file "uploadFile.php" on the server. But there are neither errors nor positive result. I will be grateful for any suggestions/advices.