Skip navigation
PrincyPadma
Currently Being Moderated

How to pass an image from the mobile application to the Adobe Media Server?

Dec 2, 2013 10:13 PM

Tags: #adobe_air #adobe_media_server_5 #flex_air_mobile

The image is taken as photo from the CameraUI in the Client Side(AIR Mobile Application) and saved as a .jpg file in the mobile. I passed the image byte array values from the client to the server. How to convert that byte array to a file in the Adobe Media server?

 
Replies
  • Currently Being Moderated
    Dec 3, 2013 8:35 AM   in reply to PrincyPadma

    You can use File class to write bytearray to a file. For more details about the same, check the following link:

     

    http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS5b3ccc516d4fbf35 1e63e3d11a11afc95e-7eacSSASLR.2.3.html

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 6, 2013 1:47 AM   in reply to PrincyPadma

    You can use NetConnection.call method and pass ByteArray as one of the arguments. For more details about NetConnection.call(), check the link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/net/NetConnection.html#call()

     

    Also, In the server side you can create a ByteArray object and call ByteArray.writeBytes() method to write the data to server side ByteArray or else you can directly write the ByteArray to a file in binary mode. For more details about ByteArray class see:

     

    http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS37cb61f8f3397d86 -59ed32111288f0b936c-8000.2.3.html

     

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/utils/ByteArray.html

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 6, 2013 10:25 AM   in reply to Chandan_Abhishek

    This is very similar to the problem here:

    http://forums.adobe.com/thread/655314

     

    processByteArray = function(byteArrayAsPlainObject){

         // byteArrayAsPlainObject is an object serialized from a ByteArray but without functions

         // we need to get a ByteArray that we can call functions on

         var usableByteArray = new ByteArray();

         byteArrayAsPlainObject.position = 0; // make sure we start from the beginning

         ByteArray.prototype.readBytes.call(byteArrayAsPlainObject, usableByteArray);

     

         // now usableByteArray contains what was in the original argument, but we can actually use it on the server side

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points