<< Click to Display Table of Contents >> Navigation: Actions > Uploading files |
To upload file from client perform the following steps:
1.Set form field type to file.
2.In Client script write
form.show(
function(){
Server.Upload();
form.hide();
}
)
3.In Server script write
procedure Upload();
begin
UIClass.UploadMyFile(Request);
end;
4.Implement UploadMyFile method in Delphi TWebUIClass assiciated with action/table.
Request.Param['<field name>'] will contain file name, Request.Param['<field name>_content'] will contain base64 encoded file content.
To decode it use htutils.Base64DecodetoBytes function.