summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-09-23 21:12:27 +0200
committerRory& <root@rory.gay>2025-09-29 18:38:06 +0200
commit2a10b3528fd369e2e9c5aa2385ba2a39c06e1585 (patch)
treec7b489be064ace1450472fa459ffb6e3586da896 /src/api
parentFix ID references (diff)
downloadserver-ts-2a10b3528fd369e2e9c5aa2385ba2a39c06e1585.tar.xz
Fix upload filename
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/channels/#channel_id/attachments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/attachments.ts b/src/api/routes/channels/#channel_id/attachments.ts

index 5da1a778..d515a120 100644 --- a/src/api/routes/channels/#channel_id/attachments.ts +++ b/src/api/routes/channels/#channel_id/attachments.ts
@@ -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,