From 31c6450f5e68728c859c2fe3b3719bda04394614 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 23 Sep 2020 21:03:13 +0100 Subject: [PATCH] tidy up --- packages/server/src/api/controllers/static.js | 10 +--------- .../src/attachments/Dropzone.svelte | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/server/src/api/controllers/static.js b/packages/server/src/api/controllers/static.js index 4938e9477f..663c4c7257 100644 --- a/packages/server/src/api/controllers/static.js +++ b/packages/server/src/api/controllers/static.js @@ -68,7 +68,6 @@ exports.uploadFile = async function(ctx) { } async function processLocalFileUploads({ files, outputPath, instanceId }) { - console.log("files", files) // create attachments dir if it doesnt exist !fs.existsSync(outputPath) && fs.mkdirSync(outputPath, { recursive: true }) @@ -77,20 +76,13 @@ async function processLocalFileUploads({ files, outputPath, instanceId }) { // filenames converted to UUIDs so they are unique const processedFileName = `${uuid.v4()}.${fileExtension}` - // { - // name: 'backspace-solid.svg', - // path: '/Users/martinmckeaveney/Downloads/backspace-solid.svg', - // size: 813, - // type: 'image/svg+xml' - // } - return { name: file.name, path: file.path, size: file.size, type: file.type, processedFileName, - // extension: fileExtension, + extension: fileExtension, outputPath: join(outputPath, processedFileName), url: join("/attachments", processedFileName), } diff --git a/packages/standard-components/src/attachments/Dropzone.svelte b/packages/standard-components/src/attachments/Dropzone.svelte index df93cd0d4e..5d443b2674 100644 --- a/packages/standard-components/src/attachments/Dropzone.svelte +++ b/packages/standard-components/src/attachments/Dropzone.svelte @@ -1,5 +1,4 @@