Re: Huge files over 500 MB? - WeOnlyDo Discussion board

Re: Huge files over 500 MB? (General questions)

by cyman, Wednesday, March 17, 2010, 03:14 (5364 days ago) @ cyman

Tho actually I'm not sure if that's even possible given the structure. I guess you'd first need to analyze the Request to see where the file(s) even start!

Only way to do this without locking up would be with an unusual structure, like:
u.Request.ManualUploadProcessing = True

do

dim result as boolean = u.Request.Uploads.processNextUpload

if not result then exit do

c = u.Request.Uploads.current
c.getName
c.getContentType
dim br as new BinaryReader(c.getDataStream)
....

loop

By the way, when I say as it loads I mean *after* the entire Request file is uploaded and saved to disk, I could have something like:

Dim dataBuffer As Byte()
Dim FileReader As New BinaryReader(e.user.Request.Uploads(0).getFileAsStream)

dataBuffer = BinaryReader.ReadBytes(1000000)
My.Computer.FileSystem.WriteAllBytes( CustomerFile.Zip , dataBuffer, True)

If you did this with the .NET version of WodWebServer, then I would be willing to pay a reasonable price to upgrade to the .NET version, since I don't know if BinaryReaders exist outside of that.

O .. I am using VB.NET 2008, so I do have threading. I use the ActiveX.

Personally for me, AsyncSave wouldn't solve the problem. Best would be something to let me stream the file from wodWebServer as it loads, similar to a BinaryReader. (Ex: I could then send it as a response to another client as well as a file at the same time. Even tho the whole file might not be saved, since they are downloading slowly anyways, it would be fine.)

Also, note sure if it is possible, but could there be support for 2GB+ files like with WodFTPServer? [I have that too.]

I asked about programming environment to see if you have threading capabilities, so perhaps parsing can be done in separate thread.

But I'm also considering to provide AsyncSave method, that would take the file and export it to real file in separate thread, so main process doesn't freeze. It will still take 15-20 seconds, but your app would be responsive in the meantime.

Kreso


Complete thread: