Pure PHP Upload 2 Support Product Page
Pure upload that allows own resize script?
 Shared  05 Dec 2009  12:10:45 
  1 
     likes   this idea  
  05 Dec 2009  12:10:45 student 101 posted: 
 Pure upload should allow me to add my own resize image  script, where could I add it in PUP? In any one of these files?
I could use the already added code?
function setThumbFileName($newFileName, $path, $naming, $suffix) {
    $this->thumbFileName = $newFileName;
    $this->thumbPath = $path;
    $this->thumbNaming = $naming;
    $this->thumbSuffix = $suffix;
    $this->thumbName = substr($newFileName, 0, strrpos($newFileName, '.'));
    $this->thumbExtension = substr($newFileName, strrpos($newFileName, '.')+1);
    if (file_exists($path."/".$this->thumbFileName)) {
      $this->thumbSize = round((filesize($path."/".$this->thumbFileName)/1024), 0);
    }
    $this->upload->uploadedFiles[$this->field] = $this;
  }
  function setThumbSize($width, $height) {
    $this->thumbWidth = $width;
    $this->thumbHeight = $height;
    $this->upload->uploadedFiles[$this->field] = $this;
  }
  function setImageSize($width, $height) {
    $this->imageWidth = $width;
    $this->imageHeight = $height;
    $this->upload->uploadedFiles[$this->field] = $this;
  }Replies
 Replied 11 Dec 2009  16:57:40 
   11 Dec 2009  16:57:40 Patrick Julicher replied: 
  Hi Json,
I also added your request for using own resize code to the wish list for future updates.
Kind regards, Patrick
  I also added your request for using own resize code to the wish list for future updates.
Kind regards, Patrick
 Replied 11 Dec 2009  17:45:48 
   11 Dec 2009  17:45:48 student 101 replied: 
 That's cool. [
Thanks! [
 Replied 02 Apr 2010  00:53:28 
   02 Apr 2010  00:53:28 student 101 replied: 
 Hi Patric,
Where do I look in the PHP upload script?
 Replied 06 Apr 2010  12:26:46 
   06 Apr 2010  12:26:46 Patrick Woldberg replied: 
  You can always add your own resize image script, should work. Place it after the Pure Upload class, then you are sure the file is at the location you uploaded and you can do whatever you want with the file. The function your showing from the Pure Upload aren't needed unless you also have some other extensions that rely on Pure Upload, then you can use those function to set the correct values so the other extensions can find the files. 
   Replied 06 Apr 2010  17:58:34 
   06 Apr 2010  17:58:34 student 101 replied: 
 At the end of class pureFileUpload
or the end of $ppu->doUpload();
 Replied 23 Jul 2010  10:52:18 
   23 Jul 2010  10:52:18 student 101 replied: 
 My resize script works, as soon as I add the PHP Upload my resize code stops working?


