hypothesis / support-legacy

a place for tracking support-related work and projects
3 stars 0 forks source link

LMS app no longer opens direct-link URL PDFs hosted at box.com #171

Closed mattdricker closed 3 years ago

mattdricker commented 3 years ago

Previously, LMS app users could host a PDF on box.com and point Hypothesis to the direct-link URL to allow the PDF to be annotated.

Currently, when attempting to annotate a PDF using the direct-link URL, PDF.js throws an error: Message: Unexpected server response (409) while retrieving PDF

User reported this in their Sakai instance. I have replicated in our Canvas instance: Screen Shot 2021-02-22 at 1 40 33 PM

Note: The ability to generate a direct-link URL in box.com (bypassing box.com's web viewer) requires a business account.

HS Ticket: https://app.hubspot.com/contacts/6291320/ticket/307222030 HAR file attached to ticket.

To Reproduce

  1. Create Hypothesis assignment in LMS, using direct-link URL of box.com hosted PDF.
  2. Open assignment

I've created an example assignment in Canvas: https://hypothesis.instructure.com/courses/92/assignments/1478

Expected behavior PDF should open successfully in Hypothesis viewer and allow for annotation.

Note: Box.com direct-link URLs go through 3 server redirects, resulting in a final URL that downloads the PDF. Using that final redirected URL for the LMS assignment, rather than the original, allows the PDF to load in Hypothesis successfully.

I've created another Canvas assignment that shows successful loading of PDF using the final URL: https://hypothesis.instructure.com/courses/92/assignments/1489

mattdricker commented 3 years ago

Closing. We plan on working to incorporate native support for filesharing services in future.