On Oct 22, 10:03 pm, Sheldon <[email protected]> wrote:
> I'm able to get the file downloaded, but am drawing a blank as to how
> to download it as a filestream instead of a physical file on the
> user's hard drive.

A FileStream *is* a Stream of bytes wrapped around a File on the disk.
They are not mutually exclusive objects.

> Using the code listed below, I'd like to not create the file "C:\temp
> \temp.123", but rather return the file as a filestream.Can anyone give
> me some pointers on this?  Maybe I'm going about it the wrong way.
> Ultimately what I will be doing is downloading a file from the FTP
> site, passing it to a file viewer program for display.  Once the user
> closes the viewer, the download file should be discarded.  If I am
> dealing with physical files on the user's hard drive, then I also have
> to make sure my file viewer deletes the downloaded file before
> closing; I figured it would be easier to just pass the downloaded file
> around as an object in memory.

Use a MemoryStream instead of a FileStream.

Reply via email to