mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 22:58:48 +01:00
Add support to validate uploaded avatars
This commit is contained in:
parent
469d81f8a5
commit
c64a221453
10 changed files with 87 additions and 13 deletions
|
|
@ -3,7 +3,6 @@ import Avatars from '/models/avatars';
|
|||
import Users from '/models/users';
|
||||
import Org from '/models/org';
|
||||
import Team from '/models/team';
|
||||
import { formatFleURL } from 'meteor/ostrio:files/lib';
|
||||
|
||||
Template.userAvatar.helpers({
|
||||
userData() {
|
||||
|
|
@ -218,13 +217,6 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
false,
|
||||
);
|
||||
uploader.on('uploaded', (error, fileRef) => {
|
||||
if (!error) {
|
||||
self.setAvatar(
|
||||
`${formatFleURL(fileRef)}?auth=false&brokenIsFine=true`,
|
||||
);
|
||||
}
|
||||
});
|
||||
uploader.on('error', (error, fileData) => {
|
||||
self.setError(error.reason);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue