Skip to content

Commit

Permalink
Use the blueimp error handler in the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sheeep committed Jul 14, 2013
1 parent 75b9de7 commit 04db98f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Tests/App/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ oneup_uploader:
frontend: blueimp
storage:
directory: %kernel.root_dir%/cache/%kernel.environment%/upload
error_handler: oneup_uploader.error_handler.blueimp

blueimp_validation:
frontend: blueimp
max_size: 256
storage:
directory: %kernel.root_dir%/cache/%kernel.environment%/upload
error_handler: oneup_uploader.error_handler.blueimp
allowed_extensions: [ "ok" ]
disallowed_extensions: [ "fail" ]
allowed_mimetypes: [ "image/jpg", "text/plain" ]
Expand Down
2 changes: 1 addition & 1 deletion Uploader/ErrorHandler/BlueimpErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public function addException(ResponseInterface $response, UploadException $excep
$message = $exception->getMessage();
}

$response->addToOffset(array('error' => $message), 'files');
$response->addToOffset('files', array('error' => $message));
}
}

0 comments on commit 04db98f

Please sign in to comment.