forked from capability-boosters-dev/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read from Location on 201 response from upload
fixes CNVS-39065 vs. success_url for legacy path or body of S3 redirect. for parity with those old responses, we need to have the Location returned from the capture include the `enhanced_preview_url` when appropriate. not sure why, but when S3 gives you a redirect after successful upload, the XHR follows the redirect happily. when inst-fs does, Canvas gives a CORS error (at least during local development with docker). rather than try and tell the difference and fix, it, we really shouldn't be redirecting anyways. use the appropriate REST status and let the client know that it wants to fetch from the Location explicitly. this explicit request is happy without any CORS mangling. test-plan: - have your local canvas connected to local inst-fs - go to <canvas>/files - upload a new file - upload should succeed, including adding the new file to the UI - repeat for any other place you can think of to upload a file in canvas, including: - avatars - gradebook - submissions - conversations - etc. Change-Id: I312aaa17fd000843131c89023e827410cc5e13c6 Reviewed-on: https://gerrit.instructure.com/126012 Tested-by: Jenkins Reviewed-by: Andrew Huff <[email protected]> QA-Review: Collin Parrish <[email protected]> Product-Review: Jacob Fugal <[email protected]>
- Loading branch information
Showing
8 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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