New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileUpload: simple & auto doesnt work anymore #7352
Labels
Milestone
Comments
i liked to suggest this approach for #7284 as simple mode fits better. But it seems its broken. @melloware would you like to check it?
is registred but the handler is never called? at least in my firefox |
Let me check it out. |
MonkeyPatch if someone needs it: if (PrimeFaces.widget.SimpleFileUpload) {
PrimeFaces.widget.SimpleFileUpload.prototype.init = function(cfg) {
PrimeFaces.widget.DeferredWidget.prototype.init.call(this, cfg);
if (this.cfg.disabled) {
return;
}
this.cfg.invalidFileMessage = this.cfg.invalidFileMessage || 'Invalid file type';
this.cfg.invalidSizeMessage = this.cfg.invalidSizeMessage || 'Invalid file size';
this.cfg.fileLimitMessage = this.cfg.fileLimitMessage || 'Maximum number of files exceeded';
this.cfg.messageTemplate = this.cfg.messageTemplate || '{name} {size}';
this.cfg.global = (this.cfg.global === true || this.cfg.global === undefined) ? true : false;
this.sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
this.maxFileSize = this.cfg.maxFileSize;
this.form = this.jq.closest('form');
this.input = $(this.jqId);
if (this.cfg.skinSimple) {
this.button = this.jq.children('.ui-button');
this.display = this.jq.children('.ui-fileupload-filename');
if (!this.input.prop('disabled')) {
this.bindEvents();
}
} else if (this.cfg.auto) {
var $this = this;
this.input.on('change.fileupload', function() {
$this.upload();
});
}
}
}; |
melloware
added
workaround
A workaround has been provided
elite
This issue is related to an Elite release
labels
May 25, 2021
tandraschko
pushed a commit
that referenced
this issue
May 25, 2021
Thanks! |
buunsal
added
10.0.2
and removed
elite
This issue is related to an Elite release
labels
May 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The text was updated successfully, but these errors were encountered: