Skip to content

fix: export download link prefix - #614

Merged
KristinAoki merged 2 commits into
masterfrom
KristinAoki/fix-export-download-link
Sep 28, 2023
Merged

fix: export download link prefix#614
KristinAoki merged 2 commits into
masterfrom
KristinAoki/fix-export-download-link

Conversation

@KristinAoki

Copy link
Copy Markdown
Contributor

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

  1. Navigate to the export mfe page
  2. Export a course
  3. Click the download button
  4. File downloads as expected

@codecov

codecov Bot commented Sep 27, 2023

Copy link
Copy Markdown

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (887a628) 86.60% compared to head (382d831) 86.61%.
Report is 1 commits behind head on master.

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           
Files Coverage Δ
src/export-page/data/thunks.js 84.21% <100.00%> (+1.35%) ⬆️
src/export-page/export-stepper/ExportStepper.jsx 96.42% <100.00%> (ø)

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

@KristinAoki
KristinAoki merged commit 4840666 into master Sep 28, 2023
@KristinAoki
KristinAoki deleted the KristinAoki/fix-export-download-link branch September 28, 2023 16:14
snglth pushed a commit to Abstract-Tech/community-theme-course-authoring that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants