mirror of
https://github.com/plankanban/planka.git
synced 2025-12-22 09:15:37 +03:00
feat: Preserve original format of images, change interpolation kernel
Closes #349
This commit is contained in:
@@ -50,7 +50,7 @@ module.exports = {
|
||||
sails.config.custom.attachmentsPath,
|
||||
attachment.dirname,
|
||||
'thumbnails',
|
||||
'cover-256.jpg',
|
||||
`cover-256.${attachment.image.thumbnailsExtension}`,
|
||||
);
|
||||
|
||||
if (!fs.existsSync(filePath)) {
|
||||
|
||||
@@ -88,7 +88,7 @@ module.exports = {
|
||||
project = await sails.helpers.projects.updateOne(
|
||||
project,
|
||||
{
|
||||
backgroundImageDirname: fileData.dirname,
|
||||
backgroundImage: fileData,
|
||||
},
|
||||
this.req,
|
||||
);
|
||||
|
||||
@@ -89,7 +89,7 @@ module.exports = {
|
||||
user = await sails.helpers.users.updateOne(
|
||||
user,
|
||||
{
|
||||
avatarDirname: fileData.dirname,
|
||||
avatar: fileData,
|
||||
},
|
||||
currentUser,
|
||||
this.req,
|
||||
|
||||
@@ -65,15 +65,17 @@ module.exports = {
|
||||
throw Errors.USER_NOT_FOUND;
|
||||
}
|
||||
|
||||
const values = _.pick(inputs, [
|
||||
'isAdmin',
|
||||
'name',
|
||||
'avatarUrl',
|
||||
'phone',
|
||||
'organization',
|
||||
'language',
|
||||
'subscribeToOwnCards',
|
||||
]);
|
||||
const values = {
|
||||
..._.pick(inputs, [
|
||||
'isAdmin',
|
||||
'name',
|
||||
'phone',
|
||||
'organization',
|
||||
'language',
|
||||
'subscribeToOwnCards',
|
||||
]),
|
||||
avatar: inputs.avatarUrl,
|
||||
};
|
||||
|
||||
user = await sails.helpers.users.updateOne(user, values, currentUser, this.req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user