Skip to content

Commit

Permalink
Update to v1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kid1194 committed Aug 21, 2022
1 parent abbf605 commit 1c20555
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlAttach.extend({
on_attach_click: function() {
$log('Attaching file');
this.set_upload_options();
this.file_uploader = new frappe.ui.FileUploader(!this._images_only ? this.upload_options : this.image_upload_options);
this.file_uploader = new frappe.ui.FileUploader(this.upload_options);
},
set_upload_options: function() {
this._parse_options();
Expand All @@ -187,10 +187,9 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlAttach.extend({
if (isDataObject(this._options)) {
Object.assign(options, this._options);
}
this.upload_options = this.image_upload_options = options;
this.upload_options = options;
if (this._images_only) {
this.image_upload_options = deepCloneObject(options);
this._parse_image_types(this.image_upload_options.restrictions);
this._parse_image_types(this.upload_options.restrictions);
}
},
_value_to_array: function(value, def) {
Expand Down

0 comments on commit 1c20555

Please sign in to comment.