From 64487ad923d7ed48af7c0b8bd69c7e1df779e531 Mon Sep 17 00:00:00 2001 From: Mateo Gallardo Date: Mon, 12 Feb 2024 15:18:01 -0300 Subject: [PATCH 1/2] Fixed file uploads performance issues (#1562) --- packages/bruno-electron/src/ipc/network/prepare-request.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js index 94b476f1a..d793ad938 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-request.js @@ -15,11 +15,12 @@ const parseFormData = (datas, collectionPath) => { const filePaths = value || []; filePaths.forEach((filePath) => { let trimmedFilePath = filePath.trim(); + if (!path.isAbsolute(trimmedFilePath)) { trimmedFilePath = path.join(collectionPath, trimmedFilePath); } - const file = fs.readFileSync(trimmedFilePath); - form.append(name, file, path.basename(trimmedFilePath)); + + form.append(name, fs.createReadStream(trimmedFilePath), path.basename(trimmedFilePath)); }); } else { form.append(name, value); From 3c87c1df69af641df974610d6660b6a2b63ea814 Mon Sep 17 00:00:00 2001 From: Ricardo Silverio Date: Tue, 13 Feb 2024 07:17:58 -0300 Subject: [PATCH 2/2] Fix crash when closing modal of confirmation before exit (#1574) --- contributing.md | 4 ---- .../RequestTabs/RequestTab/ConfirmRequestClose/index.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/contributing.md b/contributing.md index 14c9a28e7..7c0beac62 100644 --- a/contributing.md +++ b/contributing.md @@ -28,10 +28,6 @@ You would need [Node v18.x or the latest LTS version](https://nodejs.org/en/) an Bruno is being developed as a desktop app. You need to load the app by running the Next.js app in one terminal and then run the electron app in another terminal. -### Dependencies - -- NodeJS v18 - ### Local Development ```bash diff --git a/packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js b/packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js index cc5374a07..d02704636 100644 --- a/packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js +++ b/packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js @@ -12,6 +12,7 @@ const ConfirmRequestClose = ({ item, onCancel, onCloseWithoutSave, onSaveAndClos disableEscapeKey={true} disableCloseOnOutsideClick={true} closeModalFadeTimeout={150} + handleCancel={onCancel} onClick={(e) => { e.stopPropagation(); e.preventDefault();