You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an upload button for hypothesis's pdf.js view:
However, when i upload a local file via this button, the hypothes.is sidebar remain the content for original file.
I suppose with this bug fixed, it's possible to use hypothes.is on android device without hosting file on server, as i can use a dummy page and upload the file, i am actually considering developing a PWA out of it, making the mobile use of hypothes.is easier.
Now, after playing around with the code, it seems the problem can be fixed by modifying webViewerFileInputChange in web/viewer.js by adding the following at the end of the function
I don't know it's the correct way, but Do please consider fix this bug!
The text was updated successfully, but these errors were encountered:
StructSeeker
changed the title
[Bug] Hypothes.is not updated after uploading new file.
[Bug] Hypothes.is not updated after opening new file.
Jan 10, 2025
That code should work, although this could be handled in a more efficient way if the Hypothesis client monitored for changes in the current file rather than requiring the whole client to be reloaded. We already support this for web pages, but not PDFs.
We are currently having some internal discussions about packaging PDF.js + Hypothesis in a way that is easier for us to share across projects. In that context we'll need to avoid hard-coding the client URL as it varies depending on context.
My suggestions for the moment are:
Go and and use the code snippet you posted in your own project
There is an upload button for hypothesis's pdf.js view:
However, when i upload a local file via this button, the hypothes.is sidebar remain the content for original file.
I suppose with this bug fixed, it's possible to use hypothes.is on android device without hosting file on server, as i can use a dummy page and upload the file, i am actually considering developing a PWA out of it, making the mobile use of hypothes.is easier.
Now, after playing around with the code, it seems the problem can be fixed by modifying
webViewerFileInputChange
inweb/viewer.js
by adding the following at the end of the functionI don't know it's the correct way, but Do please consider fix this bug!
The text was updated successfully, but these errors were encountered: