Browse Source

Merge pull request #4063 from achillesrasquinha/develop

Fixed Image URL render to container
version-14
Rushabh Mehta 7 years ago
committed by GitHub
parent
commit
9f1caa100e
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      frappe/public/js/frappe/form/controls/attach.js

+ 11
- 1
frappe/public/js/frappe/form/controls/attach.js View File

@@ -169,7 +169,17 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
if(this.frm) { if(this.frm) {
return this.value; return this.value;
} else { } else {
return this.fileobj ? (this.fileobj.filename + "," + this.dataurl) : null;
if ( this.fileobj ) {
if ( this.fileobj.file_url ) {
return this.fileobj.file_url;
} else if ( this.fileobj.filename ) {
var dataURI = this.fileobj.filename + ',' + this.dataurl;

return dataURI;
}
}

return null;
} }
}, },




Loading…
Cancel
Save