Make studio file uploads site aware - #482
Conversation
5e8a304 to
da38337
Compare
da38337 to
ed77f2c
Compare
There was a problem hiding this comment.
@OmarIthawi Do we need to check that asset_url has a leading slash? I assume asset_url is the resource path from the root?
There was a problem hiding this comment.
Great question @johnbaldwin!
Yes, I think we do need it. I want to avoid the http->https redirect which Open edX enforces by default. The double slashes ensure that at least when a secure site uses the URL, it'll work.
The leading slashes break the link for when including the files in an on-disk HTML file (file://) but we don't care about this case.
Some annoyance is found when using $ curl:
$ curl //courses.edx.org/robots.txt
curl: (3) <url> malformed
I do like to have the leading slashes, but I'm open to removing them.
I've also renamed base to be domain so it's more clear, and yes asset_url looks like the following: /asset-v1:Red+Red+Red2020+type@asset+block@2017-Scrum-Guide-US.pdf
ed77f2c to
2da6bf5
Compare
|
Thanks @johnbaldwin! I've answered your comments. I'll merge for now. Let me know if this would need a follow up work! |
This makes the
assetsAPI site-aware.The
assetsAPI is what the File Page Upload uses.This fixes: RED-147 - Itential: Make Files & Uploads web links microsite-aware.