file not uploaded to the wanted location

See all posts See thread Reply

Re: file not uploaded to the wanted location new!
by colin, 17 years, 5 months ago
What your hosting company says is right, however you can still read the file from the temp directory, or so I believe. I understand the problem that you have, but I never experienced it. I heard that the same behaviour occurs in a chroot situation.

The code which makes problem is the following:
if ($this->processed && !file_exists($this->file_src_pathname)) {
  $this->processed = false;
  $this->error = _("No source file. Can't carry on a process");
}

As far as I know, that code should be OK, since you should be able to have PHP to check if the file exists, before you copy it (even with move_uploaded_file()). I will do some checks tonight if I get a bit of time.

Otherwise, the solution would be to modify the class so that the uplaoded file is first copied in a temporary directory on which you have full access. I meant to do that for the chroot people anyway, but it's a fairly big change, and also you need to set up a temp directory. This is annoying since most problem will not actually need it.

I will see, and get back to you.Reply