| @@ 81-93 (lines=13) @@ | ||
| 78 | $inputFileInfo = pathinfo($this->input->{'input_asset'}->{'file'}); |
|
| 79 | ||
| 80 | // Create the tmp folder if doesn't exist |
|
| 81 | if (!file_exists($this->tmpPathInput)) |
|
| 82 | { |
|
| 83 | if ($this->debug) |
|
| 84 | $this->cpeLogger->log_out("INFO", basename(__FILE__), |
|
| 85 | "Creating TMP input folder '".$this->tmpPathInput."'", |
|
| 86 | $this->activityLogKey); |
|
| 87 | ||
| 88 | if (!mkdir($this->tmpPathInput, 0750, true)) |
|
| 89 | throw new CpeSdk\CpeException( |
|
| 90 | "Unable to create temporary folder '$this->tmpPathInput' !", |
|
| 91 | self::TMP_FOLDER_FAIL |
|
| 92 | ); |
|
| 93 | } |
|
| 94 | ||
| 95 | $this->pathToInputFile = null; |
|
| 96 | if (isset($this->input->{'input_asset'}->{'bucket'}) && |
|
| @@ 195-207 (lines=13) @@ | ||
| 192 | $this->output->{'output_file_info'} = $outputFileInfo; |
|
| 193 | $this->pathToOutputFiles .= "/".$outputFileInfo['dirname']; |
|
| 194 | ||
| 195 | if (!file_exists($this->pathToOutputFiles)) |
|
| 196 | { |
|
| 197 | if ($this->debug) |
|
| 198 | $this->cpeLogger->log_out("INFO", basename(__FILE__), |
|
| 199 | "Creating TMP output folder '".$this->pathToOutputFiles."'", |
|
| 200 | $this->activityLogKey); |
|
| 201 | ||
| 202 | if (!mkdir($this->pathToOutputFiles, 0750, true)) |
|
| 203 | throw new CpeSdk\CpeException( |
|
| 204 | "Unable to create temporary folder '$this->pathToOutputFiles' !", |
|
| 205 | self::TMP_FOLDER_FAIL |
|
| 206 | ); |
|
| 207 | } |
|
| 208 | } |
|
| 209 | ||
| 210 | // Perform custom validation on JSON input |
|