Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download files with original filename #3303

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Aug 3, 2022

Fixes #3286

This PR changes the way files are downloaded on the Patient Dashboard page, Instead of just using a blob, this PR makes it so that a filename is specified in the download attribute, which makes the browser save the blob with the specified filename. This allows us to download files with the same name and extension as they were originally uploaded.

Previous Behavior :-
Uploaded name: sample1.jfif
Downloaded name: d5q2wwc-fa5ee......txt

New Behavior:-
Uploaded name: sample1.jfif
Downloaded name: sample1.jfif

image

@Ashesh3 Ashesh3 requested a review from a team August 3, 2022 07:20
@Ashesh3 Ashesh3 requested a review from a team as a code owner August 3, 2022 07:20
@netlify
Copy link

netlify bot commented Aug 3, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 78b4404
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6301ebb67d85b900084c53dd
😎 Deploy Preview https://deploy-preview-3303--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@nihal467
Copy link
Member

nihal467 commented Aug 9, 2022

@Ashesh3
image

the file name of a PDF is different in care and download

@Ashesh3
Copy link
Member Author

Ashesh3 commented Aug 9, 2022

@Ashesh3 image

the file name of a PDF is different in care and download

Hey, I am unable to replicate this issue. The file downloads correctly for me, with the correct file name.

https://deploy-preview-3303--care-egov-staging.netlify.app/facility/bd466cf6-0fde-46b1-9591-0acf9d955dd1/patient/163c6459-d121-4814-9ef4-4ef35937711f/files/

image

Could you take a look at this again? If the issue persist, please let me know the steps which lead to the issue.

Side note: Please note that the file name is added only when the "Download" button is pressed. If the file automatically downloads, without you even pressing the download button, then your browser is triggering the preview as a download. Which would be unrelated to this issue. (Related to previewing files)

image

@nihal467
Copy link
Member

test approved

@khavinshankar khavinshankar added the merge conflict pull requests with merge conflict label Aug 19, 2022
@Ashesh3 Ashesh3 removed the merge conflict pull requests with merge conflict label Aug 21, 2022
@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

@khavinshankar khavinshankar merged commit ec5168b into coronasafe:develop Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

download file malfunction : File Upload
5 participants