Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Upload Component


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Feb 17, 2016 12:09 PM Last Post By: Erick Engelke
John Borchers

Posts: 42
Registered: 9/23/10
Upload Component  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 13, 2016 4:52 PM
Hi all,

In the function below. The memo completely fills with the file information but where does the file actually end up? I don't see it locally and also can't see it on the server. I see it uses a tmp file name I'm assuming this name is the selected file copied to a temp location to upload to the server because this also disappears after this function is called. At least that's what is seems.

TIA,
John

function UploadClick($sender, $params)
{
//upload the file
$this->UploadStatus->Caption = 'GotClick ' . $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);
}

Erick Engelke

Posts: 101
Registered: 12/5/02
Re: Upload Component  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2016 12:09 PM   in response to: John Borchers in response to: John Borchers
John Borchers wrote:
Hi all,

In the function below. The memo completely fills with the file information but where does the file actually end up? I don't see it locally and also can't see it on the server. I see it uses a tmp file name I'm assuming this name is the selected file copied to a temp location to upload to the server because this also disappears after this function is called. At least that's what is seems.

TIA,
John

The file is deleted as part of the garbage collection at the end of the HTTP request.
You can copy the file to a different location if you want it to persist.

Erick

--
Erick Engelke
HTML5 Builder Book
http://www.erickengelke.com
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02