Ver código fonte

[SETUP] Fixed file_url fetch for profile image

version-14
Achilles Rasquinha 7 anos atrás
pai
commit
47ab1c1b03
1 arquivos alterados com 12 adições e 1 exclusões
  1. +12
    -1
      frappe/public/js/frappe/form/controls/attach.js

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

@@ -169,7 +169,18 @@ 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;
// 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