This method is called when an upload of an individulal flie is complete. The filename is passed and you can then decide what to do with the file.
You can override this method to provide custom behavior in a subclass or implement the cOnUploadCompleteFunction() which fires a function with the same signature as this method. One of these typically needs to be implemented in order to do something useful with an uploaded file.
Note: You can hook this event without subclassing by using FoxPro's BindEvent():
*** Implemented as Process class method FUNCTION OnUploadComplete(lcFilename, loUpload) LOCAL lcUrl, lcFile *** Resize the image lcFile = ADDBS(loUpload.cUploadPath) + lcFileName ResizeImage(lcFile,lcFile,640,480) *** Delete expired files - only for 10 minutes DeleteFiles(ADDBS(JUSTPATH(lcFile)) + "*.*",600) *** We'll return the URL to the image uploaded here lcUrl = this.ResolveUrl("~/temp/" + lcFileName) *** Write out the response for the client (if any) *** In this case the URL to the uploaded image loUpload.WriteCompletionResponse(lcUrl) ENDFUNC
See also:Class plUploadHandler
Comment or report problem with topic