How do I upload an image to Adobe Media Server?
Here's what I'm trying to do. I have a sharedObject that I want to store my thumbnail in.
sharedObject = SharedObject.getRemote("thumbnail",mync.uri,false);
Then I get the image and send it
var screenshot:BitmapData = new BitmapData(VD1.width,VD1.height,false);
var encoder:PNGEncoder = new PNGEncoder();
var pngByteArray:ByteArray = encoder.encode(screenshot);
But this code doesn't do anything. I'm probably going about it the wrong way.
The ActionScript3 reference says that you can:
Store and share data on Flash Media Server. A shared object can store data on the server for other clients to retrieve
However, I don't want other clients to retrieve it. I just want it to be stored on the server as a .png. How can I do this?
Hello, for this to work you’d need to first use middleware such as PHP, CF, .NET, Java, etc. This is needed since your binary data outgoing from Flash Player and it needs to undergo (de)serialization. Here is a sample done in CF - http://snapshots.pbochan.com.
Actually, I got this to work by sending the byteArray to the server, and then writing the byteArray to a new file.