Use to open the Upload Files dialog box that enables an application user to upload files from the local computer to the Web server.
void UploadFiles (string serverFolder, long bgColor, int fileNum, boolean showServerFolder, string description, string allowExts{, string callbackFunctionName}{, PowerObject po})
None.
#if defined PBWEBFORM then UploadFiles("d:\hhh", w_main.BackColor, 3, false, "my description", ".jpg;.txt", "myuploadfiles_callback", w_main) #end if
#if defined PBWEBFORM then UploadFiles("c:\hhh", RGB(0, 255, 0), 1, true, "", "", "myuploadfiles_callback", w_main) #end if
Use the UploadFiles function in conjunction with a private callback function that you create for a PowerBuilder object.
int i for i = 1 to upperbound(up_files) this.mle_1.text += "~r~n" + up_files[i] next return i
If the "myuploadfiles_callback" function is created on the window w_main, you can use this window name as the value of the po argument in your Upload Files call. If you create the "myuploadfiles_callback" function as a global function, you can use the UploadFiles callback syntax without the po argument.
If your application uses sequential UploadFiles calls in the same script, only the callback function in the last of the UploadFiles calls is valid. The other UploadFiles calls can still upload selected files to the Web server, but further processing of the names of the uploaded files does not occur, even when the syntax for these calls includes a callback function that codes for such processing.
If the last UploadFiles call in a script containing sequential UploadFiles calls does not use a callback function, no callback processing occurs.