473,793 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving a download from a web server into a file

I have an app that downloads a number of images from a web server and
displays them. In addition to displaying the images, I also wish to "cache"
them by saving them locally to disk - asynchrounously . I know I can do this
using the following proceedure:

1) perform a beginread on the network stream (result of GetResponseStre am)
to write the bytes to a Byte []
2) create a filestream object and do a beginwrite to write the Byte [] to disk

The question is there a way to do this in one step? I would like to write
the network stream directly to disk without having to go through the
intermediate step of writing the data to the Byte []?

I appreciate any assistance that anyone can provide.

thanks,
-joe-
Feb 13 '07 #1
0 974

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

Similar topics

1
5649
by: John | last post by:
(access 2002) Anyone have any suggestions as to what may be causing access to not save form changes after I "tell" it to, exit database, then re-open later to discover the changes had not been saved (or somehow reverted). BUT, new form module code is saved. Example: created txtTitle control on form. Create AfterUpdate event code for txtTitle. Save form. Close database. Later...Open database, open form, txtTitle not there but its event...
5
3146
by: Thaynann | last post by:
I have an app that (at the moment) moves through files that are on a web site, and deletes them, wat i want to do for the next stage, is to be able to download each file before i delete it. i have tried POSTin to be able to view the image, then saving it, but it doesnt work, the problem i have is that all the files on the server have the same name, which is http://1.1.1.1/DH/repository/content.tif and for me to be able to view one, i...
0
1795
by: Karen Grube | last post by:
Hi! I hate to bother you all with this, but I don't know how best to approach a particular task. Here's the deal: Once a month I personally (that is, in my own personal inbox on my company's email server) receive an email from one of our vendors to which is attached a text file (a comma-delimited data file containing the details of our monthly
4
6724
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
1
1710
by: Jim Andersen | last post by:
Hi, I want to make a backup of some data from an SQL server. The backup should be saved as an Excell file (or similar, csv or xml...) So I create a datatable and select the data from SQL server and manipulate it a bit. No problem. But how do I save it on the Client PC ? Do I have to go through an intermediary step of saving it on the server and then transferring the file (somehow) and deleting the file on the server.
1
2365
by: harriegovin | last post by:
Hi, Here is the scenario. I have a web application written in vb.net. One of the functionalities of the application is to save the recordset in an xml format on to the client machine. The xml file needs to be saved on the client machine for the offline application to work. when the user works on the offline module the data in the saved xml file gets updated. The data from the updated xml file needs to be written back to the main...
3
4553
by: sean.j.gage | last post by:
I'm attempting to download a windows media video file from a remote server and I would like to start playing it as soon as it starts downloading. Is there some special way to save the file that will allow Windows Media Player to play the file as I transfer it? Cheers!
0
851
by: judyajose | last post by:
Hi, In my application, when i click on "Run", I'm creating a CSV file and storing on the server. then i've a href link "History Report" with the following code <A HREF = "<%downloadFileName%>" target ="_blank" title="Click here to download the report"> History Report </a> Only on click of this link, should the csv file open. But since it is a large file, i've to first ask user to save. The dialog box comes whether to open or save, but...
1
5843
by: MSwanston | last post by:
Hi I need some help with saving retreiving data from the cache, and how best to structure my code. FYI am working in VS2005/under .NET2 Framework. Ok, we have a series of reports that get run via a report filter screen, and whilst each report is being generated, it populates a memorystream/streamwriter. This has always been done this way but I am trying to update/improve and generally speed things up. The variables are declared as follows:...
6
8070
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command to change the Content- Type and Content-Disposition headers, and essentially print the same report, and it's done. That works fine. But in some reports on the web I need to show images. The web part is fine, but I'm having a tough time...
0
9518
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10433
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9035
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.