Ver código fonte

Merge pull request #4063 from achillesrasquinha/develop

Fixed Image URL render to container
version-14
Rushabh Mehta 7 anos atrás
committed by GitHub
pai
commit
9f1caa100e
1 arquivos alterados com 11 adições e 1 exclusões
  1. +11
    -1
      frappe/public/js/frappe/form/controls/attach.js

+ 11
- 1
frappe/public/js/frappe/form/controls/attach.js Ver arquivo

@@ -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;
}
},



Carregando…
Cancelar
Salvar