Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix direct linking to PDFs in DocDrop #69

Open
dwhly opened this issue Nov 18, 2020 · 2 comments
Open

Fix direct linking to PDFs in DocDrop #69

dwhly opened this issue Nov 18, 2020 · 2 comments

Comments

@dwhly
Copy link
Collaborator

dwhly commented Nov 18, 2020

No description provided.

@xolotl
Copy link

xolotl commented Nov 18, 2020

URLs to the document and individual annotations provided in the Hypothesis sidebar lead to the statically hosted PDFs rather than the full DocDrop experience. For example, for this doc: https://docdrop.org/pdf/Student-Speak-2020-FINAL-aaXkf.pdf/ the URL offered in the sidebar to the page is: https://hyp.is/go?url=https%3A%2F%2Fdocdrop.org%2Fstatic%2Fdrop-pdf%2FStudent-Speak-2020-FINAL-aaXkf.pdf&group=__world__ and the URL offered for a specific annotation is like https://hyp.is/3ORkEB6-EeudCeP_WofpaA/docdrop.org/static/drop-pdf/Student-Speak-2020-FINAL-aaXkf.pdf

This means none of the usual Hypothesis sharing pathways work well in DocDrop.

image

@genuineBuildMonkey
Copy link
Collaborator

genuineBuildMonkey commented Jun 1, 2021

I've looked into this and tried to come up with a workaround. Still thinking about it.

I believe Hypothesis obtains the link (used for sharing) from the canonical url created by PDFJS. This is the link to the actual document (which is provided to PDFJS on creation). I don't see an explicit way to override that and resetting it after the fact unsurprisingly doesn't change the link picked up by Hypothesis.

This issue brings up another important point. With the new cloud storage scheme we must change the underlying document url provided to PDFJS from the S3 (cloud storage) one to an actual docdrop link as the cloud storage links remain valid for a limited time.

I'm not sure we will be able to force Hypothesis to recognize the share link as DocDrop links (unless we can find a workaround) but we do need to change the document source url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants