original_string: public function deleteAction($parameter) {
          try {
              if(!$this->request->isPost()) {
                  return $this->jsonResult(400, 'Please access via POST method.', 'error_access_post');
              }
  
              if(!$this->getFile()) {
                  return $this->jsonResult(400, 'No file was uploaded.', 'error_no_file');
              }
  
              $this->initFromSession();
  
              $this->file = NULL;
  
              $this->filename = NULL;
  
              $this->filesize = NULL;
  
              $this->saveToSession();
  
              if(!$this->deleteFile()) {
                  return $this->jsonResult(400, 'Could not delete file.', 'error_delete_failed');
              }
  
              return $this->jsonResult();
          }
          catch(Exception $e) {
              return $this->jsonResult(500, $e->getMessage());
          }
      }
code: public function deleteAction($parameter) {
          try {
              if(!$this->request->isPost()) {
                  return $this->jsonResult(400, 'Please access via POST method.', 'error_access_post');
              }
  
              if(!$this->getFile()) {
                  return $this->jsonResult(400, 'No file was uploaded.', 'error_no_file');
              }
  
              $this->initFromSession();
  
              $this->file = NULL;
  
              $this->filename = NULL;
  
              $this->filesize = NULL;
  
              $this->saveToSession();
  
              if(!$this->deleteFile()) {
                  return $this->jsonResult(400, 'Could not delete file.', 'error_delete_failed');
              }
  
              return $this->jsonResult();
          }
          catch(Exception $e) {
              return $this->jsonResult(500, $e->getMessage());
          }
      }
code_tokens: public function deleteAction ( $ parameter ) { try { if ( ! $ this -> request -> isPost ( ) ) { return $ this -> jsonResult ( 400 , 'Please access via POST method.' , 'error_access_post' ) ; } if ( ! $ this -> getFile ( ) ) { return $ this -> jsonResult ( 400 , 'No file was uploaded.' , 'error_no_file' ) ; } $ this -> initFromSession ( ) ; $ this -> file = NULL ; $ this -> filename = NULL ; $ this -> filesize = NULL ; $ this -> saveToSession ( ) ; if ( ! $ this -> deleteFile ( ) ) { return $ this -> jsonResult ( 400 , 'Could not delete file.' , 'error_delete_failed' ) ; } return $ this -> jsonResult ( ) ; } catch ( Exception $ e ) { return $ this -> jsonResult ( 500 , $ e -> getMessage ( ) ) ; } }
docstring: Deletes a previously uploaded file. Must be accessed with the POST method.
  
  An json response will be generated and send back to the client.
  { 'success': TRUE|FALSE, [ 'error': errorstring ] }
docstring_tokens: Deletes a previously uploaded file . Must be accessed with the POST method .