Merge upstream

This commit is contained in:
무라쿠모 2024-08-12 18:37:03 +09:00
commit b546ab3252
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7
17 changed files with 2802 additions and 3710 deletions

View file

@ -113,7 +113,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.invalidParam);
}
const calcHash = createHash('sha256').update(`${ps.folderId}:${ps.isSensitive}`);
const calcHash = createHash('sha256').update(`${ps.folderId}:${ps.name}:${ps.isSensitive}`);
await stream.pipeline(fs.createReadStream(file.path, { encoding: 'binary', start: 0, end: 1024 * 1024 }), calcHash);
const hash = calcHash.digest('base64');
logger.setContext({ userId: me.id, hash, ip, headers });