fix not working file upload, if not mime-type specified

This commit is contained in:
Ralf Becker 2020-06-02 18:53:33 +02:00
parent 1a91dfab7d
commit 25615d7ee0
2 changed files with 4 additions and 0 deletions

View File

@ -281,6 +281,8 @@ var et2_file = /** @class */ (function (_super) {
* @return boolean * @return boolean
*/ */
et2_file.prototype.checkMime = function (f) { et2_file.prototype.checkMime = function (f) {
if (!this.options.mime)
return true;
var mime = ''; var mime = '';
if (this.options.mime.indexOf("/") != 0) { if (this.options.mime.indexOf("/") != 0) {
// Lower case it now, if it's not a regex // Lower case it now, if it's not a regex

View File

@ -403,6 +403,8 @@ export class et2_file extends et2_inputWidget
*/ */
checkMime(f) checkMime(f)
{ {
if(!this.options.mime) return true;
let mime: string | RegExp = ''; let mime: string | RegExp = '';
if(this.options.mime.indexOf("/") != 0) if(this.options.mime.indexOf("/") != 0)
{ {