parent
705d40ab37
commit
3f71b14637
22 changed files with 249 additions and 214 deletions
|
@ -327,7 +327,6 @@ export default async function(
|
|||
const properties: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
avgColor?: string;
|
||||
} = {};
|
||||
|
||||
if (info.width) {
|
||||
|
@ -335,10 +334,6 @@ export default async function(
|
|||
properties['height'] = info.height;
|
||||
}
|
||||
|
||||
if (info.avgColor) {
|
||||
properties['avgColor'] = `rgb(${info.avgColor.join(',')})`;
|
||||
}
|
||||
|
||||
const profile = user ? await UserProfiles.findOne(user.id) : null;
|
||||
|
||||
const folder = await fetchFolder();
|
||||
|
@ -351,6 +346,7 @@ export default async function(
|
|||
file.folderId = folder !== null ? folder.id : null;
|
||||
file.comment = comment;
|
||||
file.properties = properties;
|
||||
file.blurhash = info.blurhash || null;
|
||||
file.isLink = isLink;
|
||||
file.isSensitive = user
|
||||
? Users.isLocalUser(user) && profile!.alwaysMarkNsfw ? true :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue