Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello!

I'm using it on a project, and when I run localhost it works, but when I run from the serverthat does not get the image of the flash file.

HTML
HTML
<object width="395" height="180">
    <param name="movie" value="WebcamResources/save_picture.swf">
    <embed src="WebcamResources/save_picture.swf" width="395" height="180"></embed>
</object>



C#
C#
string strPhoto = Request.Form["imageData"]; //Get the image from flash file
byte[] photo = Convert.FromBase64String(strPhoto);
FileStream fs = new FileStream("C:\\Webcam.jpg", FileMode.OpenOrCreate, FileAccess.Write);
BinaryWriter br = new BinaryWriter(fs);
br.Write(photo);
br.Flush();
br.Close();
fs.Close();



I wonder if there are any specific configuration for this solution is implementedthrough a server? or another version of the file Base64.as?

Thank you!
Posted
Updated 29-Feb-12 2:21am
Comments
ZurdoDev 1-Mar-12 16:36pm    
Does it error?
Put Try Catch block and handle the Exception.

1 solution

Quote:

[^]


[^]


[^]



refer these articles
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900