Skip to content

Commit

Permalink
fix(drive/idempotence): #683 (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Aug 12, 2024
1 parent 5a9d8a5 commit 8c6a25a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 8c6a25a

Please sign in to comment.