瀏覽代碼

Merge pull request #4063 from achillesrasquinha/develop

Fixed Image URL render to container
version-14
Rushabh Mehta 7 年之前
committed by GitHub
父節點
當前提交
9f1caa100e
共有 1 個檔案被更改,包括 11 行新增1 行删除
  1. +11
    -1
      frappe/public/js/frappe/form/controls/attach.js

+ 11
- 1
frappe/public/js/frappe/form/controls/attach.js 查看文件

@@ -169,7 +169,17 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
if(this.frm) {
return this.value;
} 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…
取消
儲存