Frank Vèssia Posted February 4, 2013 Share Posted February 4, 2013 Hello, is there a way to customize the default error messages of the wireUpload ? Link to comment Share on other sites More sharing options...
diogo Posted February 4, 2013 Share Posted February 4, 2013 I think you can do it on the translation files, but I'm not sure. Link to comment Share on other sites More sharing options...
ryan Posted February 5, 2013 Share Posted February 5, 2013 The ones you are most likely to encounter are translatable from /wire/core/Upload.php There is some other English text in there, but that is mostly for developer use and debugging/testing, so didn't think it needed to be translatable. Though let me know if you find something that should be. Link to comment Share on other sites More sharing options...
Wanze Posted February 22, 2013 Share Posted February 22, 2013 Hi ryan, When one sets the max upload value with the hidden MAX_FILE_SIZE, then the message "Exceeds max allowed file size" never appears. The error UPLOAD_ERR_FORM_SIZE get's caught already on the first line of the WireUpload::isValidUpload method. If we don't put a MAX_FILE_SIZE field, it works. But I remember having read somwhere that when setting the MAX_FILE_SIZE field and the user submits a bigger file, then it is not getting uploaded at all which I think is important. I should have a translation too Maybe moving the initialization of $errorInfo to the constructor, allowing to translate the strings? Or provide a method to get also the error-keys, not only the strings? Thanks <?php //When MAX_FILE_SIZE is sent and the file is too big, it get's caught on this line if($error && $error != UPLOAD_ERR_NO_FILE) $this->error($this->errorInfo[$error]); 1 Link to comment Share on other sites More sharing options...
ryan Posted February 25, 2013 Share Posted February 25, 2013 I think I understand what you mean now. No problem--I'll move the definition of that text into the __construct so that they can be translated. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now