From 11e7fb88cbfc420078cddd19fd85d8b0dbea9b77 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sun, 10 Mar 2024 10:57:49 -0700 Subject: [PATCH] Cancel file selection sets to undefined --- src-web/components/BinaryFileEditor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-web/components/BinaryFileEditor.tsx b/src-web/components/BinaryFileEditor.tsx index 3df32f98..458818e4 100644 --- a/src-web/components/BinaryFileEditor.tsx +++ b/src-web/components/BinaryFileEditor.tsx @@ -36,6 +36,8 @@ export function BinaryFileEditor({ }); if (path) { onChange({ filePath: path }); + } else { + onChange({ filePath: undefined }); } }; @@ -56,7 +58,7 @@ export function BinaryFileEditor({ {filePath ?? 'Select File'} - {mimeType !== contentType && !ignoreContentType.value && ( + {filePath != null && mimeType !== contentType && !ignoreContentType.value && (
Set Content-Type header to