fix: resolve document download URLs before triggering download
This commit is contained in:
parent
75244527ae
commit
66fe7c2d3d
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ const DocumentViewer = ({ documents, sellerId }) => {
|
|||
const handleDownload = (doc) => {
|
||||
// Downloads directly from S3 URL returned by backend in doc.url
|
||||
const link = document.createElement('a');
|
||||
link.href = doc.url;
|
||||
link.href = resolveUrl(doc.url);
|
||||
link.download = doc.filename;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
|
|
|||
Loading…
Reference in a new issue