Project

General

Profile

Bug #3234

Incorrect File Download Behavior on Document Verification Page

Added by Shreya Agarwal 13 days ago. Updated 13 days ago.

Status:
New
Priority:
Normal
Start date:
10/01/2026
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

When a user clicks the "View" action (eye icon) for a document, the system downloads the file directly instead of opening like a panel . so fix this issue .

#1

Updated by Shreya Agarwal 13 days ago

On the /document-verification page, clicking the eye button in the Actions column previously triggered unwanted direct file downloads or opened raw S3 media URLs in a new browser tab. Additionally, direct access to private S3 files resulted in AWS AccessDenied XML errors due to missing signature parameters. To resolve this, I implemented an in-app Document Preview Modal that fetches temporary pre-signed URLs dynamically via the backend API (getDocumentViewUrl), ensuring secure access and eliminating all access denial issues.
The preview modal dynamically identifies the document type from API responses: standard image formats (PNG, JPG, WEBP, etc.) are rendered using a centered, responsive image viewer with aspect-ratio preservation and auto-overflow handling, while PDF files are displayed in an embedded viewer supporting multi-page reading. The modal styling was aligned with the project's branding system (useBrandingStyles), applying the tenant's primary colors, clean card borders, and standard button designs (primaryButtonStyle and secondaryButtonStyle) while removing duplicate controls and redundant status chips. Furthermore, the download handler was upgraded to use direct blob streaming (fetch
-> clicking "Download" immediately saves the original file directly to the user's local machine without navigating or opening new browser tabs.

Also available in: Atom PDF