You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SilverStripe\Assets\Upload_Validator::validate runs a series of checks and returns false if one fails (true otherwise).
This appears to work reasonably well in common use cases (such as a file being over the legal limit as such), however does not if for example we have a custom rule. The file is sent off, and a perfectly valid response is sent back, however there is precisely zero feedback from the AssetAdmin, and it refuses to do any more business with invalid (or sometimes valid) uploads.
@unclecheese advises me that the current checks in Upload_Validator are recreated and performed on the client side. Simply prepending the validate method with
$this->errors[] = 'Test bad response';
returnfalse;
is enough to hack in an always repeatable occurrence of the error.
tl;dr AsssetAdmin ignores all server side validation errors.
The text was updated successfully, but these errors were encountered:
SilverStripe\Assets\Upload_Validator::validate
runs a series of checks and returns false if one fails (true otherwise).This appears to work reasonably well in common use cases (such as a file being over the legal limit as such), however does not if for example we have a custom rule. The file is sent off, and a perfectly valid response is sent back, however there is precisely zero feedback from the AssetAdmin, and it refuses to do any more business with invalid (or sometimes valid) uploads.
@unclecheese advises me that the current checks in
Upload_Validator
are recreated and performed on the client side. Simply prepending thevalidate
method withis enough to hack in an always repeatable occurrence of the error.
tl;dr AsssetAdmin ignores all server side validation errors.
The text was updated successfully, but these errors were encountered: