Solved

Reading Image Control into Binary Stream

Posted on 2006-12-01
3
262 Views
Last Modified: 2012-05-05
Hi,

Is there a way by which I can read data from my web form's image control into binary stream.
And then save that stream to server as image file.

or can I read an image file on users computer into a binary file.


0
Comment
Question by:param4r
  • 2
3 Comments
 
LVL 11

Expert Comment

by:ch2
ID: 18055788
Which technology you want to use?

PHP, ASP, Script?

Here you have an example using vbscript:

http://www.eggheadcafe.com/articles/20010829.asp
0
 

Author Comment

by:param4r
ID: 18059149
thanks ch2,

thanx for replying.

the code in the url is written in VBScript, I doubt that it will work in my case because I want to read the file from the client's hard disk, and that can be achieved with javaScript only.

I also read an article which uses the exact technique provided by you in the url, using javascript.

I tried to write the code in Javascript, but I got stuck, here is my code

    var BinaryStream = new ActiveXObject("ADODB.Stream")
    BinaryStream.Type = 1;
    BinaryStream.Open();
    BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");

the last line do not execute successfully.








0
 
LVL 11

Accepted Solution

by:
ch2 earned 500 total points
ID: 18065418
I think you cannot do that only with javascript.

Would work using server-side scripting like perl, asp, php.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now