Parameter | Description |
---|---|
sFileName | Contains the original file name as uploaded to the browser (without path) |
sLocalPath | The path (including file name) where the uploaded file can be found. The path and filename parts may have been changed inside OnFileUpload |
Procedure OnFileFinished String sFileName String sLocalPath
If pbNotifyIndividualFile is True, then the OnFileFinished event is triggered in a separate call to the server after each file is saved, i.e. if five files are sent, then OnFileFinished is triggered five times in five separate server calls.
If it is False (the default), OnFileFinished is still triggered for each file, but this occurs after all the files are uploaded and they occur within a single server call.
Note that this event needs to be turned by setting pbServerOnUploadFinished to True.
Object oFileNameForm is a cWebFileUploadForm Set piColumnSpan to 0 Set psLabel to "FileName:" Function OnFileUpload String sFileName Integer iBytes String sMime Returns String String sPaths sPath Handle hoWorkspace Get phoWorkspace of ghoApplication to hoWorkspace Get psDataPath of hoWorkspace to sPaths Get PathAtIndex of hoWorkspace sPaths 1 to sPath Move (Trim (sPath)) to sPath If (Right (sPath, 1) <> "\") Begin Move (sPath - "\") to sPath End Move (sPath + "Uploads\" + sFileName) to sPath Function_Return sPath End_Function Procedure OnFileFinished String sFileName String sLocalPath Forward Send OnFileFinished sFileName sLocalPath Send ProcessFile of oFileHandler sLocalPath EraseFile sLocalPath End_Procedure End_ObjectSee Also