Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit b42132d

Browse files
committed
BUG: refs #0306. Fix java uploader by echoing the expected output
1 parent 1fc0272 commit b42132d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

core/controllers/UploadController.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ function processjavauploadAction()
200200
$params = $this->_getAllParams();
201201
if(!$this->logged)
202202
{
203+
echo "[ERROR] You must be logged in to upload";
203204
throw new Zend_Exception('You have to be logged in to do that');
204205
}
205206
$this->disableLayout();
@@ -226,8 +227,18 @@ function processjavauploadAction()
226227
{
227228
$license = null;
228229
}
229-
$item = $this->Component->Upload->createUploadedItem($this->userSession->Dao, $filename, $path, $parent, $license);
230+
231+
try
232+
{
233+
$item = $this->Component->Upload->createUploadedItem($this->userSession->Dao, $filename, $path, $parent, $license);
234+
}
235+
catch(Exception $e)
236+
{
237+
echo "[ERROR] ".$e->getMessage();
238+
throw $e;
239+
}
230240
$this->userSession->uploaded[] = $item->getKey();
241+
echo "[OK]";
231242
}
232243
} //end processjavaupload
233244

0 commit comments

Comments
 (0)