diff options
Diffstat (limited to 'lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx')
| -rw-r--r-- | lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx b/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx index 0593206a..fccedf0a 100644 --- a/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx +++ b/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx @@ -51,6 +51,7 @@ import prettyBytes from "pretty-bytes" import { formatDate } from "@/lib/utils" import { processTechSalesRfqAttachments } from "@/lib/techsales-rfq/service" import { useSession } from "next-auth/react" +import { downloadFile } from "@/lib/file-download" const MAX_FILE_SIZE = 6e8 // 600MB @@ -406,8 +407,9 @@ export function TechSalesRfqAttachmentsSheet({ {/* Download button */} {field.filePath && ( <a - href={`/api/tech-sales-rfq-download?path=${encodeURIComponent(field.filePath)}`} - download={field.originalFileName || field.fileName} + // href={`/api/tech-sales-rfq-download?path=${encodeURIComponent(field.filePath)}`} + // download={field.originalFileName || field.fileName} + onClick={() => downloadFile(field.filePath, field.originalFileName || field.fileName)} className="inline-block" > <Button variant="ghost" size="icon" type="button" className="h-8 w-8"> |
