instructure/canvas-lms — pull request #360 by va7map (2013-10-30 16:57:04+00:00)
Title: Fix inability to preview deleted/re-uploaded file

*This is an attempt to fix Issue #180. By not recursively fetching the URL from the `root_attachment` (if any), the preview URL will work even if the `root_attachment` was deleted. Thoughts or comments?*

The problem affects an instance using local storage and Google Docs Preview. When previewing a file that was previously deleted, an error message saying "unable to find the document at the original source" will be displayed in Google Docs Preview. This is because the preview URL is no longer valid. In fact, it redirects to the login page.

Test Plan:
* Disable Scribd but enable Google Docs Preview
* Upload a brand new file to a course
* Preview the file
* Delete it, and re-upload the same file
* Confirm that the file can still be previewed

---

*NOTE: We have a signed CLA for all of Simon Fraser University (SFU) on file.*