Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 631
Product
FileUp
Title
Server-Side Progress Indicator Fails to Refresh
Problem
Server-Side Progress Indicator opens, but fails to refresh, remaining at 0%, even after the upload has successfully finished.
Solution
On the upload processing page, (the page that instantiates FileUp) the ProgressID must be obtained before the upload is cached. Otherwise, the upload will be written to disk before the progress monitoring process begins. The upload is cached under the following situations:
  • Accessing a form element
  • Accessing a file property
  • Calling one of the Save methods

Following the recommended coding practice will ensure that the ProgressID is obtained prior to the caching of the upload. (Example assumes use of querystring to obtain ProgressID. A cookie may also be used.)

  '--- Declarations
  Dim oFileUp

  '--- Instantiate the FileUp object
  Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")

  '--- Assign the same progress ID
  '--- that we assigned to the progress object.
  oFileUp.ProgressID = CInt(Request.QueryString("progressid"))

  '--- Set the Path property to the location you wish to
  '--- temporarily cache the incoming file before saving
  oFileUp.Path = "C:\MyUploadFolder"

  '--- This next line of code is an example of what forces the
  '--- upload to finally be cached. Parsing through
  '--- FileUp's form collection to check an element's content
  '--- requires that the upload be cached.
  If Not oFileUp.Form("myFile").IsEmpty Then
    (...) other code here
  End if
Created : 5/23/2003 11:44:47 AM (last modified : 5/23/2003 11:44:44 AM)
Rate this article!
Comments