Fix upload filename

This commit is contained in:
Rory& 2025-09-23 21:12:27 +02:00
parent 17948c77d7
commit 2a10b3528f

View File

@ -71,7 +71,7 @@ router.post(
const attachments = await Promise.all(
payload.files.map(async (attachment) => {
attachment.filename = attachment.filename.replaceAll(" ", "_").replace(/[^a-zA-Z0-9._]+/g, "");
const uploadFilename = `${batchId}/${attachment.id}/${attachment.filename}`;
const uploadFilename = `${channel_id}/${batchId}/${attachment.id}/${attachment.filename}`;
const newAttachment = CloudAttachment.create({
user: user,
channel: channel,