mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-23 14:46:40 +09:00
fix(drive/idempotence): MisskeyIO#683 (MisskeyIO#687)
This commit is contained in:
parent
5a9d8a5564
commit
8c6a25acb7
@ -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 });
|
||||
|
Loading…
Reference in New Issue
Block a user