PrairieLearn
PrairieLearn copied to clipboard
Refactor how file transfers work
Details
Currently, file transfers work like this:
POST to page, authorizing you for the source. Insert a record into the file transfers table. Redirect you to the destination URL, and use middleware auth. If authorized, kick off the transfer. Then delete the record.
This pattern is overly complex, and makes it hard to pass arbitrary data between the source and destination systems. Now that we have the constructCourseOrInstanceContext, we can avoid this and clean up this code.