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 Download URLs #4066

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Fix Download URLs #4066

merged 2 commits into from
Jun 29, 2023

Conversation

axelstudios
Copy link
Member

@axelstudios axelstudios commented May 30, 2023

Any background context you want to provide?

The import-file download buttons on the Dataset Detail page weren't working for any files stored in directories with more than one level of nesting from the media directory.

For example, a PM import stored in /seed/media/uploads/pm_imports/pm_import_2023-05-30.csv was incorrectly linking to /api/v3/media/pm_imports/pm_import_2023-05-30.csv (missing the uploads directory).

What's this PR do?

Fixes all download links regardless of nesting and mixed slashes

How should this be manually tested?

  1. Upload a file normally, and import a file from ESPM
  2. With nginx running, check that the download links for both files work as expected

@axelstudios axelstudios marked this pull request as draft May 30, 2023 22:31
@axelstudios axelstudios changed the title WIP: Fixed Download URLs WIP: Fix Download URLs May 30, 2023
@axelstudios axelstudios force-pushed the bugfix/fix-import-file-downloads branch from 422e5a1 to 34ac4b9 Compare May 30, 2023 22:36
@axelstudios axelstudios changed the title WIP: Fix Download URLs Fix Download URLs Jun 13, 2023
@axelstudios axelstudios requested a review from kflemin June 13, 2023 16:48
@axelstudios axelstudios marked this pull request as ready for review June 13, 2023 16:48
Copy link
Contributor

@kflemin kflemin left a comment

Choose a reason for hiding this comment

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

🏆

@axelstudios axelstudios merged commit 9699e9d into develop Jun 29, 2023
7 checks passed
@axelstudios axelstudios deleted the bugfix/fix-import-file-downloads branch June 29, 2023 00:38
dhaley pushed a commit that referenced this pull request Jul 21, 2023
Fixed download urls with backslashes and more than 1 level of nesting
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.

None yet

2 participants