/**
  * Upload a file
  * @param $args array
  * @param $request PKPRequest
  * @return string
  */
 function uploadCopyeditedFile($args, &$request)
 {
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     $signoffId = (int) $request->getUserVar('signoffId');
     assert(!empty($signoffId));
     import('controllers.grid.files.copyedit.form.CopyeditingFileForm');
     $copyeditingFileForm = new CopyeditingFileForm($monograph, $signoffId);
     $copyeditingFileForm->readInputData();
     if ($copyeditingFileForm->validate()) {
         $copyeditedFileId = $copyeditingFileForm->uploadFile($args, $request);
         $router =& $request->getRouter();
         $additionalAttributes = array('deleteUrl' => $router->url($request, null, null, 'deleteFile', null, array('fileId' => $copyeditedFileId)));
         $json = new JSON(true, Locale::translate('submission.uploadSuccessful'), false, $copyeditedFileId, $additionalAttributes);
     } else {
         $json = new JSON(false, Locale::translate('common.uploadFailed'));
     }
     echo $json->getString();
 }
 /**
  * @see Form::fetch()
  */
 function fetch(&$request)
 {
     return parent::fetch($request);
 }