CodePudding user response:
Can, 20 points, direct copy from the manual wellThe following example uploads The file to The application 's virtual root d: \ HHH directory on The server, and sets The color of The Upload Files dialog box to The background color of The w_main application window, limits The number of Files to be uploaded in a single operation to 3, does not display The server directory name in The Upload Files dialog box but does display The "my description" text, and limits The types of Files that can be uploaded to JPG and TXT Files:
# if defined PBWEBFORM then
UploadFiles (" d: \ HHH, w_main BackColor, 3, false, "my description", "the JPG. .txt myuploadfiles_callback ", ", w_main)
# end if
The following example opens The file aaa. TXT in The download mode:
# if defined PBWEBFORM then
DownloadFile (" c: \ aaa. TXT ", false)
# end if
The download mode causes The File download dialog box to display, giving The user The choice of opening The File, and saving The File, or cancelling The operation. The File download dialog box displays The File name, The File type, The number of bytes in The File, and The name of The server that hosts The File.
The following code opens a dialog box that allows users to select a directory and download multiple files from The same directory:
String docpath, docname []
Boolean lb_openinteger I, li_cnt li_rtn, li_filenum
Lb_open=true//or false
Li_rtn=GetFileOpenName (" Select File ", docpath, & amp; + docname [], "DOC", & amp; + "Text Files (*.txt), *. TXT," & amp; + "Doc Files (*.doc), *. Doc," & amp; + "All Files (*. *), *. *", & amp; "C: \ Program Files \ Sybase," 18)
IF li_rtn & lt; 1 THEN returnli_cnt=Upperbound (docname)
//if only one file is picked, docpath contains the//the path and file nameif li_cnt=1 then mle_1. Text=string (docpath) # if defined PBWEBFORM then DownloadFile (string (docpath), lb_open) # end ifelse
//if multiple files are picked, docpath contains//the path only - concatenate docpath and docname
For I=1 to li_cnt
String s
S=string (docpath) + "" + (string (docname [I]))
# if defined PBWEBFORM then
DownloadFile (s, lb_open)
# end if
Mle_1. Text +=s + "~ r ~ n
"Next
End the if
CodePudding user response:
Formula one on? Remote data upload download, can use this?CodePudding user response:
canCodePudding user response:
Check the PB help, these things are inside