mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 12:18:49 +01:00
Ref: original & and use fileObj.meta
fileObj.meta is part of the ostrio:files API and be passed to the constructor. This is less hacky than trying tu update a persistet object after the fact.
This commit is contained in:
parent
16506e7a6a
commit
e702f17c7b
10 changed files with 124 additions and 159 deletions
|
|
@ -93,7 +93,7 @@ template(name="changeAvatarPopup")
|
|||
unless isSelected
|
||||
a.js-delete-avatar {{_ 'delete'}}
|
||||
| -
|
||||
= original.name
|
||||
= name
|
||||
li: a.js-select-initials
|
||||
.member
|
||||
+userAvatarInitials(userId=currentUser._id)
|
||||
|
|
|
|||
|
|
@ -229,13 +229,13 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
false,
|
||||
);
|
||||
uploader.on('uploaded', (error, fileObj) => {
|
||||
uploader.on('uploaded', (error, fileRef) => {
|
||||
if (!error) {
|
||||
self.setAvatar(fileObj.path);
|
||||
self.setAvatar(fileRef.path);
|
||||
// self.setAvatar(this.currentData().url(this.avatarUrlOptions()));
|
||||
}
|
||||
});
|
||||
uploader.on('error', (error, fileObj) => {
|
||||
uploader.on('error', (error, fileData) => {
|
||||
// XXX check for actually returned error
|
||||
self.setError('avatar-too-big');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue