使用来自 HTML5 Builder Embarcadero 的上传组件
上传是表单上启用提交的按钮。但是文档并没有告诉我实际文件的去向。在假定的成功上传后调用此函数时,上传的所有名称都会出现。我可以在备忘录框中看到临时文件名、文件名、文件大小等。但是,当我从 Windows 10 中的 HTML 5 Builder 或服务器上尝试此操作时,上传的目标文件似乎不存在。我肯定错过了什么。
function UploadClick($sender, $params)
{
//upload the file
$this->UploadStatus->Caption = 'BtnUploadClick ' . $this->Upload1->FileName;
$this->Memo1->AddLine('FileTmpName: ' . $this->Upload1->FileTmpName);
$this->Memo1->AddLine('FileName: ' . $this->Upload1->FileName);
$this->Memo1->AddLine('FileSize: ' . $this->Upload1->FileSize);
$this->Memo1->AddLine('FileType: ' . $this->Upload1->FileType);
$this->Memo1->AddLine('FileSubType : ' . $this->Upload1->FileSubType);
$this->Memo1->AddLine('GraphicWidth: ' . $this->Upload1->GraphicWidth);
$this->Memo1->AddLine('GraphicHeihgt: ' . $this->Upload1->GraphicHeight);
if($this->Upload1->isGIF ())
$tmp = ' is gif';
if($this->Upload1->isJPEG())
$tmp = ' is jpeg';
if($this->Upload1->isPNG())
$tmp = ' is png';
$this->Memo1->AddLine('File Ext: ' . $this->Upload1->FileExt . $tmp);
}