473,406 Members | 2,217 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,406 software developers and data experts.

Possible to write an image to a file?

Using the HttpRequest object to gather material (potentially from an
external server), is it possible to write the response stream into which
ever file type is required e.g. I request not just text, but an image - is
is possible to write the image to file? Or is this just not possible? I can
only find reference to create a text file.

Thanks.
May 25 '06 #1
6 3284

no****@invalid.invalid wrote:
Using the HttpRequest object to gather material (potentially from an
external server), is it possible to write the response stream into which
ever file type is required e.g. I request not just text, but an image - is
is possible to write the image to file? Or is this just not possible? I can
only find reference to create a text file.

Thanks.


This is a useful link.

<URL:http://www.motobit.com/tips/detpg_read-write-binary-files/>

Regards

Julian Turner

May 25 '06 #2
no****@invalid.invalid wrote:
Using the HttpRequest object

I think baconbutty provided your answer so I will concentrate on:

There was no way for you to know it (except maybe by browsing through
some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.
ASP.Net is a different technology from classic ASP.
While you may be lucky enough to find a dotnet-savvy person here who
can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I
suggest
microsoft.public.dotnet.framework.aspnet.

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 25 '06 #3
> I think baconbutty provided your answer so I will concentrate on:

There was no way for you to know it (except maybe by browsing through
some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.


Hehe, well Bob, I wasn't even remotely aware that it was an ASP.NET
question. And to be honest, I'm a newbie in ASP and don't even know what the
difference is yet!.

The link above, wasn't exactly spot on in being helpful - have been
following links and ideas, but to no avail as yet. I just thought they'd be
an alternative method to output an image file rather than using
CreateTextFile. But perhaps, as there's no straightforward answer as yet,
there's no simple answer to my question?
May 25 '06 #4

no****@invalid.invalid wrote:
I think baconbutty provided your answer so I will concentrate on:

There was no way for you to know it (except maybe by browsing through
some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.


Hehe, well Bob, I wasn't even remotely aware that it was an ASP.NET
question. And to be honest, I'm a newbie in ASP and don't even know what the
difference is yet!.

The link above, wasn't exactly spot on in being helpful - have been
following links and ideas, but to no avail as yet. I just thought they'd be
an alternative method to output an image file rather than using
CreateTextFile. But perhaps, as there's no straightforward answer as yet,
there's no simple answer to my question?


I am an amateur at this, but AFAIK, there is no simple answer.

I have sucessfully used the information on the link provided (and
connected links referenced in it) to save binary both on the server and
the client (with client security permission of course) using VBScript.

Whether you are using basic ASP on the server, or you are seeking to
save the file client side using a responseStream from an
XMLHttpRequest, you must use either ADODB.Stream,
Scripting.FileSystemObject, XPCOM (Firefox) or some other component,
subject to any relevant security restrictions. As noted, VBScript and
JavaScript do not provide binary file handling natively.

I have no experience with ASP.NET, but I believe that it uses the
Microsoft .NET Framework, which provides a large library of components.
I would imagine that this would include binary file handling on the
server. Client side, I think you are still stuck with one of the
options above, and client side security restrictions.

Regards

Julian Turner

May 25 '06 #5
no****@invalid.invalid wrote:
I think baconbutty provided your answer so I will concentrate on:

There was no way for you to know it (except maybe by browsing through
some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.


Hehe, well Bob, I wasn't even remotely aware that it was an ASP.NET
question. And to be honest, I'm a newbie in ASP and don't even know
what the difference is yet!.


If your pages have .asp for their extension, then it's classic asp.

If they have .aspx, or .ascx, or .asmx (see the commonality?), then it's
ASP.Net.

I assumed that since you said "HTTPRequest", which is an object in the
..Net framework, that you were using .Net. However, if you meant to say
"XMLHTTPRequest", as baconbutty assumed, then it could be classic ASP,
since that is an object in the MSXML Parser which is often used in
pre-.Net applications.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 25 '06 #6
>> Hehe, well Bob, I wasn't even remotely aware that it was an ASP.NET
question. And to be honest, I'm a newbie in ASP and don't even know what the
difference is yet!.
Oh good. Another newb hunter loose in the woods who isn't sure he's packing
a 30.06 or a squirt gun.
> The link above, wasn't exactly spot on in being helpful

It should have been. Or is it because you have no idea what technology
you're even working in?

Bob Lehmann

<no****@invalid.invalid> wrote in message
news:U5******************************@bt.com... I think baconbutty provided your answer so I will concentrate on:

There was no way for you to know it (except maybe by browsing through
some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.


Hehe, well Bob, I wasn't even remotely aware that it was an ASP.NET
question. And to be honest, I'm a newbie in ASP and don't even know what

the difference is yet!.

The link above, wasn't exactly spot on in being helpful - have been
following links and ideas, but to no avail as yet. I just thought they'd be an alternative method to output an image file rather than using
CreateTextFile. But perhaps, as there's no straightforward answer as yet,
there's no simple answer to my question?

May 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Perttu Pulkkinen | last post by:
I use database to store images. So img-tags are like <img src="viewer.php?img_id=100"> Can I use javascript/php-combination to preload images of whole site after first page is loaded? Or does...
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
23
by: John | last post by:
Last year, I remember finding a web page describing how to pass the name of a file to another web page, and have that web page load that image file. Now, I can't find my record of that (it was...
3
by: Jheitmuller | last post by:
Hi, I would like to convert a VB.NET application from being a Windows app to an ASP.NET app. I'm new to web development, so this may be a simple question. Is it possible to render simple drawing...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
5
by: Sumana | last post by:
Hi All, We developed our project on VC++.Net console application to create image of disk and to write the image We are having problem with reading and writing the sector beyond 6GB Disk or...
5
by: Mark Denardo | last post by:
I have a DLL that I created that contains a reference to an image file on my hard drive and when I go to use that DLL in another program it complains that it can't find it. (I'm using a relative...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
1
by: S Reichard | last post by:
Here is my issue... I am working on creating a website http://www.adoptabrick.com The new site is in progress http://www.adoptabrick.com/pilot The first website uses flash right now on the...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.