Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 456
Product
FileUp
Version
3.4
Title
Browser shows "Estimated time left: Not known" when downloading
Problem
Browser shows "Estimated time left: Not known" when downloading
Solution
The "Estimated Time Left" information that the browser displays in the download dialog is based on the size of downloaded file, which is passed to the browser via the Content-Length header. If the browser displays the estimated time left as "Not Known", then either the content-length header was not set, or the browser is not functioning properly. Unfortunately, browsers sometimes ignore certain response header information.

In a download script, the header is added like this:

Response.AddHeader "Content-Length", intFileSize

When transfering a file from the file system, this Content-Length value can easily be obtained by using SoftArtisans FileManager, which is installed together with FileUp. For instance:

<%
set oFS = Server.CreateObject("SoftArtisans.FileManager")

set oF = oFS.GetFile("c:\myFilesToDownload\download.doc")
Response.AddHeader "Content-Length", oF.Size

set oF = nothing set oFS = nothing
%>


If the file is stored in a database, the filesize can be stored as its own field (during the upload) and passed to the Content-length header (during the download), for instance:

<%
Size = rsBlob.Fields("FILESIZE")

Response.AddHeader "Content-Length", Size
%>


If you do not have a separate size field, you can use the built-in ADO Recordset property "ActualSize" to get the size of the BLOB and pass that in the header. For example (oRS is an ADO Recordset),

%>
Dim FileSize

FileSize = oRS("BLOBData").ActualSize
%>


As mentioned before, there are times when the browser simply will not read this header. When this occurs, unfortunately, there is very little FileUp can do, since it resides on the server not the client. This was more commonly an issue with IE 5.5 and older browsers - but it may be intermittent with newer IE browser version.

Note: Client-side controls such as SoftArtisans JFile and XFile always correctly interpret the response headers, and can be used to overcome browser ineffiencies.
Created : 12/1/2002 12:00:00 AM (last modified : 9/13/2002 12:48:01 PM)
Rate this article!
 
Comments