1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

Add file attachments

This commit is contained in:
Maksim Eltyshev 2020-04-21 05:04:34 +05:00
parent 202abacaec
commit 6a68ec9c1e
103 changed files with 1847 additions and 305 deletions

View file

@ -37,10 +37,11 @@ module.exports = {
regex: /^[a-zA-Z0-9]+(_?[a-zA-Z0-9])*$/,
allowNull: true,
},
avatar: {
avatarDirname: {
type: 'string',
isNotEmptyString: true,
allowNull: true,
columnName: 'avatar_dirname',
},
phone: {
type: 'string',
@ -91,8 +92,9 @@ module.exports = {
customToJSON() {
return {
..._.omit(this, 'password'),
avatar: this.avatar && `${sails.config.custom.uploadsUrl}/${this.avatar}`,
..._.omit(this, ['password', 'avatarDirname']),
avatarUrl:
this.avatarDirname && `${sails.config.custom.userAvatarsUrl}/${this.avatarDirname}/100.jpg`,
};
},
};