fix: export download link prefix - #614
Merged
Merged
Conversation
KristinAoki
requested review from
connorhaugh,
jesperhodge,
kenclary and
rayzhou-bit
September 27, 2023 18:23
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #614 +/- ##
=======================================
Coverage 86.60% 86.61%
=======================================
Files 386 386
Lines 5743 5746 +3
Branches 1267 1269 +2
=======================================
+ Hits 4974 4977 +3
Misses 745 745
Partials 24 24
☔ View full report in Codecov by Sentry. |
kenclary
approved these changes
Sep 28, 2023
snglth
pushed a commit
to Abstract-Tech/community-theme-course-authoring
that referenced
this pull request
Jan 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the export link differences between relative export paths and absolute export paths. Currently all export path received from the api are treated as relative paths so the port for the page is prepended to the relative path. However, not all the export paths from the api are guaranteed to be relative paths. In the case that export path is an absolute path, the file will fail to download because the absolute path was prepended with unnecessary port. This PR a checks if the export path is relative or absolute and prepends the port accordingly.
Testing