Hi!
I captured screenshot of my ui element, and would like to send it to server, using httpService.
Currently I am doing the following:
var httpService:HTTPService = new HTTPService();
httpService.method = "POST";
httpService.url = "/admin/compositions/add/";
httpService.addEventListener(ResultEvent.RESULT, onresult);
var bitmapData:BitmapData = new BitmapData(chessBoard.width,chessBoard.height);
var encoder:PNGEncoder = new PNGEncoder();
var data:ByteArray = encoder.encode(bitmapData);
var obj:Object = new Object();
obj.img = data;
httpService.send(obj);
But I don't see anything in files variable of request (django is the backend) e.g.
POST dictionary
QueryDict: {u'tournament': [u''], u'img': [u'\x89PNG\r\n\x1a\n'], u'sidetomove': [u'true'], u'idea': [u'\u043c\u0430\u0442 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0440\u044f\u0434\u0443'], u'source': [u''], u'complexity': [u'1'], u'opponents': [u'']}
Files dict:
MultiValueDict: {}