Smart Image Processor PHP 2 Support Product Page

Answered

SIPP2 code question

Asked 09 Oct 2013 14:14:23
1
has this question
09 Oct 2013 14:14:23 David Woolley posted:
I'm doing a spot of troubleshooting and would like to know where GP_upload originates from in the SIPP2 code below:

<?php
// Smart Image Processor PHP 2.1.0
if (isset($_GET['GP_upload'])) {
$sipplarge = new cGraphicMediator("upload", $ppu, "");
$sipplarge->setComponent("Auto");
$sipplarge->setMatteColor("#FFFFFF");
$sipplarge->resizeEx(600, 600, true, false);
$sipplarge->overwrite = false;
$sipplarge->setMask("##path##/large/##name##_large.jpg");
$sipplarge->saveJPEG(80);
$sipplarge->process();
}
?>

Replies

Replied 09 Oct 2013 14:19:31
09 Oct 2013 14:19:31 Teodor Kuduschiev replied:
Hello David,

The following part of the code:
if (isset($_GET['GP_upload'])) {  

Checks if the upload is finished, i.e. when Pure PHP Upload is executed - and when it is executed, the SIP code starts.
Replied 06 Apr 2014 14:30:37
06 Apr 2014 14:30:37 reinhardt ellis replied:
this is the winning solutions...

from another user....

Paste this code before

if (isset($editFormAction)) {    
  if (isset($_SERVER['QUERY_STRING'])) {    
      if (!preg_match('/.jpg/i',"GP_upload=true", $_SERVER['QUERY_STRING'])) {    
      $editFormAction .= "&GP_upload=true";    
        }    
  } else {    
    $editFormAction .= "?GP_upload=true";    
  }    
}


just before this line

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {


Reply to this topic