| @@ 92-95 (lines=4) @@ | ||
| 89 | ||
| 90 | // gem filen med filehandleren |
|
| 91 | $filehandler = new FileHandler($this->context->getKernel()); |
|
| 92 | if (!$file_id = $filehandler->save($tmp_file->getFilePath(), $tmp_file->getFileName(), 'hidden', 'application/pdf')) { |
|
| 93 | echo $filehandler->error->view(); |
|
| 94 | throw new Exception('Filen kunne ikke gemmes'); |
|
| 95 | } |
|
| 96 | ||
| 97 | $input['accessibility'] = 'intranet'; |
|
| 98 | if (!$file_id = $filehandler->update($input)) { |
|
| @@ 120-123 (lines=4) @@ | ||
| 117 | ||
| 118 | // gem filen med filehandleren |
|
| 119 | $filehandler = new FileHandler($this->getKernel()); |
|
| 120 | if (!$file_id = $filehandler->save($tmp_file->getFilePath(), $tmp_file->getFileName(), 'hidden', 'application/pdf')) { |
|
| 121 | echo $filehandler->error->view(); |
|
| 122 | throw new Exception('Filen kunne ikke gemmes'); |
|
| 123 | } |
|
| 124 | ||
| 125 | $input['accessibility'] = 'intranet'; |
|
| 126 | if (!$file_id = $filehandler->update($input)) { |
|