• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Upload an image and save it as an .png file?

New Here ,
Jul 26, 2013 Jul 26, 2013

Copy link to clipboard

Copied

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);

sharedObject.client=this;

sharedObject.connect(mync);

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);

pngByteArray.compress();

sharedObject.send("saveThumbnail", pngByteArray);

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?

Views

598

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 01, 2013 Aug 01, 2013

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2013 Aug 01, 2013

Copy link to clipboard

Copied

LATEST

Actually, I got this to work by sending the byteArray to the server, and then writing the byteArray to a new file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines