Fix upload filename
This commit is contained in:
parent
17948c77d7
commit
2a10b3528f
@ -71,7 +71,7 @@ router.post(
|
|||||||
const attachments = await Promise.all(
|
const attachments = await Promise.all(
|
||||||
payload.files.map(async (attachment) => {
|
payload.files.map(async (attachment) => {
|
||||||
attachment.filename = attachment.filename.replaceAll(" ", "_").replace(/[^a-zA-Z0-9._]+/g, "");
|
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({
|
const newAttachment = CloudAttachment.create({
|
||||||
user: user,
|
user: user,
|
||||||
channel: channel,
|
channel: channel,
|
||||||
|
|||||||
Reference in New Issue
Block a user