There seems to be so many ways of uploading images to a PHP enabled server, it is difficult to make sense of the various options and under what circumstances it is prefereable to use one over the other. On the front end you have the option to JPGencode or not, use a ByteArray or not, further compress the ByteArray or not. On the server side, assuming one is using PHP, there is the option of whether to use third party remoting (ZendAMF or AMFphp) or not and what the pros cons of each are.
What I see as the core sequence of steps on the front end, regardless of options
If using JPG encoding the BitMapdata is encoded, if not skip and proceed to step 3.
If using a ByteArray, a new byteArray object is instantiated and made equal to either 1 or 2, if not skip and proceed to step 4.
Connect to service -upload-save image data
Can anyone correct and or elaborate on the above?
i think, the most simple and natural way is to take the ByteArray
or BitmapData
(which is completely interchangable using getPixels
and setPixels
), encode it to JPG or PNG using as3corelib and then send it ... the advantages of encoding on client side are
most simple thing to me, would be to send it up to the server using standard URLLoader class ... data is simply in the $HTTP_RAW_POST_DATA
... there is no reason to use a framework here, unless the rest of your server is based on one of the mentioned frameworks ...
hope that helps ...
greetz
back2dos
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.