Cancel file selection sets to undefined

This commit is contained in:
Gregory Schier
2024-03-10 10:57:49 -07:00
parent efd7e7bf84
commit 11e7fb88cb

View File

@@ -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'}
</div>
</HStack>
{mimeType !== contentType && !ignoreContentType.value && (
{filePath != null && mimeType !== contentType && !ignoreContentType.value && (
<Banner className="mt-3 !py-5">
<div className="text-sm mb-4 text-center">
<div>Set Content-Type header to</div>