chore: result file name

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-26 20:24:46 +00:00
parent c3023ae4ef
commit ab587e60d0
7 changed files with 114 additions and 61 deletions

View File

@@ -49,7 +49,8 @@ export default function ToolFileResult({
const handleDownload = () => {
if (value) {
const filename = 'output-omni-tools.' + extension;
const hasExtension = value.name.includes('.');
const filename = hasExtension ? value.name : `${value.name}.${extension}`;
const blob = new Blob([value], { type: value.type });
const url = window.URL.createObjectURL(blob);