implemente attachemtn download route

This commit is contained in:
2024-01-05 12:39:22 +01:00
parent 8b7cd45087
commit eea2ca1492
6 changed files with 82 additions and 33 deletions

View File

@@ -55,9 +55,9 @@ export const BillEditForm:FC<BillEditFormProps> = ({ invoiceID, bill: { id, name
// <textarea className="textarea textarea-bordered my-1 w-full max-w-sm block" placeholder="Opis" value="Pričuva, Voda, Smeće"></textarea>
attachment ?
<a href={`/attachment/${invoiceID}-${id}/${attachment.fileName}`} className='text-center block max-w-[24em] text-nowrap truncate inline-block mt-4'>
<a href={`/attachment/${invoiceID}-${id}/${attachment.fileName}`} target="_blank" className='text-center block max-w-[24em] text-nowrap truncate inline-block mt-4'>
<DocumentIcon className="h-[1em] w-[1em] text-2xl inline-block mr-1" />
{attachment.fileName}
{decodeURIComponent(attachment.fileName)}
</a>
: null
}