473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to read a jpg bytearray from a Flash AS3 file

I'm trying to save an image from a Flash AS3 to my server as a jpg file. I found some PHP code to do this, but I want to do this in Ruby. I'm not quite sure how to convert the following code to Ruby. It's mainly the $GLOBALS["HTTP_RAW_POST_DATA"] part I don't know how to convert.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
  4.  
  5. // get bytearray $im = $GLOBALS["HTTP_RAW_POST_DATA"];
  6.  
  7. // save image $f = fopen($_GET['name'], 'wb'); fwrite($f, $jpg); fclose($f);
  8.  
  9. } else echo 'An error occured.';
  10.  
  11. ?>
source:
>>>Z>>> Removed Broken link from post <<<Z<<<
Oct 29 '12 #1
0 2761

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bob | last post by:
How do I access a flash file in my .net web pages. I have worked with image files with no problem such as: in my header.ascx program, I have a: <IMG src= "images/header_gold2.jpg"> Then, in...
3
by: sureshsundar007 | last post by:
Hi all, I want to know how to read the Flash file (.SWF) information using C#. Any help is greatly appreciated. Thanks, Suresh.
3
by: yxq | last post by:
Hello, I use the com component "shockwave flash object" to play flash file, but how to get the actual size (width*height) of flash file but no control size? thank you!
8
by: a | last post by:
I have a struct to write to a file struct _structA{ long x; int y; float z; } struct _structA A; //file open write(fd,A,sizeof(_structA)); //file close
3
by: fnustle | last post by:
I've embedded a flash file into an assembly: But when I try to reference it on a web page: <object codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab"...
3
by: sanjayvp | last post by:
Hi Everyone, I have a situation here. In one of my websites that im working on, I need to upload multiple image file, this image file can also be a flash movie file. but when im displaying the...
1
by: patronise | last post by:
My problem is that I'm wrestling to make the LoadMovie and UnloadMovie functions work for me. Here is the layout of my flash file: I've got several seperate flash files and I can jump to any one of...
11
by: Icemokka | last post by:
Hi, I'm need to upload a big file ( 600Mb+ ) to a BLOB field in MSSQL 2005. My code looks like this : fs = New FileStream(sFilePath, FileMode.Open) Dim ByteArray(fs.Length) As Byte...
3
by: JJ | last post by:
How do I embed a swf (flash) file as a resource in my custom web control? And, if thats possible, how would I access it when I am (presumably) overriding the RenderContents method? Thanks in...
0
by: digidreams | last post by:
Hello All! Can any one help me out of this problem. my site is damn slow ,so i want to play a flash file embedded in the index file and wants to load another html file(present in the subfolder) in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.