DataRequest - Uploading Event

Fired while data is being uploaded to the server

Member of DataRequest (PRIM_WEB.DataRequest)

Parameters

NameTypeData TypeDescription
Loaded*InputIntegerAmount of data uploaded in bytes
Total*InputIntegerTotal amount of data to be uploaded in bytes
Progress*InputIntegerPerentage upload complete

Details

The Uploading event is fired repeatedly while data is being transferred, providing details of the progress of the upload.

Example

In this example, an upload routine is called. Whenever the event is fired, a progress bar is updated.
Mthroutine Name(Upload)
Define_Map For(*Input) Class(#Prim_web.File) Name(#File) Pass(*By_Reference)
 
   Define_Com Class(#Xxxxx.Yyyyyy) Name(#FileUpload)
 
   #FileUpload.ExecuteAsync( #File.Blob #File.Name )
 
   #ProgressBar.Percentage := 0
 
   Evtroutine Handling(#FileUpload.Uploading) Progress(#Progress)
 
      #ProgressBar.Percentage := #Progress
 
   Endroutine
 
   Evtroutine Handling(#FileUpload.Completed)
 
      * User Processing
 
   Endroutine
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2