fix: resolve document download URLs before triggering download
All checks were successful
Beta CI/CD Pipeline / build-and-test (push) Successful in 14s
Beta CI/CD Pipeline / deploy-beta (push) Successful in 6s

This commit is contained in:
vickytechkey 2026-08-16 19:48:39 +05:30
parent 75244527ae
commit 66fe7c2d3d

View file

@ -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();