mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Set the response to 403 on error
This commit is contained in:
parent
5beaebc43a
commit
bdd936d078
@ -1235,6 +1235,7 @@ class UploadField extends FileField {
|
||||
// Format response with json
|
||||
$response = new SS_HTTPResponse(Convert::raw2json(array($return)));
|
||||
$response->addHeader('Content-Type', 'text/plain');
|
||||
if (!empty($return['error'])) $response->setStatusCode(403);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user