 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Demoder
Joined: 27 Aug 2008 Posts: 3
|
Posted: Wed Aug 27, 2008 7:02 am Post subject: HTTP_Request, how to change file download location |
|
|
Hello there.
Is there any way to tell HTTP_Request which path to use as a temporary storage area while it downloads a file? I would love to tell it to temporarly save the file in "./tmp/", to avoid risking it overwriting any files in the workdir.
Thanks in advance.
EDIT: It was late. Some false assumptions. Updated request. |
|
| Back to top |
|
 |
Demoder
Joined: 27 Aug 2008 Posts: 3
|
Posted: Wed Aug 27, 2008 10:09 am Post subject: |
|
|
Some sleep helped on the case.
I missed the sections:
| Code: | function setTarget($target)
{
$this->_target = $target;
$this->_fp = @fopen($target, 'wb');
if (!$this->_fp) {
PEAR::raiseError("Cannot open '{$target}'");
}
} |
and
| Code: | case 'tick':
$this->_size += strlen($data);
$this->_bar->update(round($this->_size / 1024));
fwrite($this->_fp, $data);
break; |
in the HTTP_Request_DownloadListener class.
Removing these parts, and adding a second download listener with some more options for where to place the file, solved the issue. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|