With a command like so:
npm run start -- --operation convert --inputDir ./test/course_packages/migration-4sdfykby_v_1_0-echo --outputDir ./out --mediaUrlPrefix https://torus-media-dev.s3.amazonaws.com/media
Then imported the resulting .zip file into a local torus to verify the media was working correctly and from the correct location.
🚨Note: I did not test the embedded-activity src/asset locations beyond writing a unit test and verifying similar results before & after my change.
This modifies the upload path of media to include a subdir part.
Before, URL would look like this: https://torus-media-dev.s3.amazonaws.com/media/487591d48552a1fea781e7437a88fd60/polar%20%26%20bear.jpg
Now, it will look like this: https://torus-media-dev.s3.amazonaws.com/media/48/487591d48552a1fea781e7437a88fd60/polar%20%26%20bear.jpg
Note the new "/48" in there.
To test this, I used the sample project at https://github.com/Simon-Initiative/course-digest/tree/master/test/course_packages/migration-4sdfykby_v_1_0-echo
With a command like so:
npm run start -- --operation convert --inputDir ./test/course_packages/migration-4sdfykby_v_1_0-echo --outputDir ./out --mediaUrlPrefix https://torus-media-dev.s3.amazonaws.com/media
Then imported the resulting .zip file into a local torus to verify the media was working correctly and from the correct location.
🚨Note: I did not test the embedded-activity src/asset locations beyond writing a unit test and verifying similar results before & after my change.