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

Fix double-extension on file download #1439

Merged
merged 10 commits into from
Dec 14, 2023

Conversation

danburonline
Copy link
Contributor

@danburonline danburonline commented Dec 4, 2023

Fixes #4529

Description

pr

Before, when you downloaded a single file via the interface, let's say example.json, the download window would show example.json.json, which is incorrect. With this change, this won't happen again.

How has this been tested?

  • Locally with dev and prod builds and manual uploading files with extensions, with no extensions and double extensions, such as example.json.json.
  • Added unit tests for several test cases.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added necessary unit and integration tests.
  • I have added screenshots (if applicable), in the comment section.

@danburonline danburonline self-assigned this Dec 4, 2023
@danburonline danburonline changed the base branch from main to develop December 4, 2023 13:20
@danburonline danburonline marked this pull request as ready for review December 4, 2023 13:22
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (22ca26d) 48.00% compared to head (de04188) 48.08%.
Report is 1 commits behind head on develop.

Files Patch % Lines
src/shared/containers/ResourceActionsContainer.tsx 0.00% 2 Missing ⚠️
src/shared/utils/download.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1439      +/-   ##
===========================================
+ Coverage    48.00%   48.08%   +0.07%     
===========================================
  Files          249      249              
  Lines        11365    11368       +3     
  Branches      2655     2655              
===========================================
+ Hits          5456     5466      +10     
+ Misses        5876     5869       -7     
  Partials        33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@bilalesi bilalesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job, small comment for covering corner case

src/shared/utils/download.ts Show resolved Hide resolved
@danburonline danburonline merged commit 4e20579 into develop Dec 14, 2023
1 check passed
@danburonline danburonline deleted the fix/download-double-extension branch December 14, 2023 10:27
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.

File Download Extension Duplication Bug
3 participants