fix: AttachmentHelper key includes double forward slash

This commit is contained in:
Tom Moor
2024-02-09 08:58:19 -05:00
parent 55005d4447
commit 24ce661b7d

View File

@@ -31,7 +31,7 @@ export default class AttachmentHelper {
}) {
const bucket = acl === "public-read" ? Buckets.public : Buckets.uploads;
const keyPrefix = `${bucket}/${userId}/${id}`;
return `${keyPrefix}/${ValidateKey.sanitize(name)}`;
return ValidateKey.sanitize(`${keyPrefix}/${name}`);
}
/**