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
We're currently trying to use DIVA.js to view some IIIF manifests. These manifests point to images being served by the Cantaloupe IIIF server, and by default, the path separator for Cantaloupe is "%2F", such that if you have an image at '/imageroot/collection/image.jpg', the "identifier" for that image would be:
iiif.example.org/iiif/2/collection%2Fimage.jpg
Given the fact that an already percent-encoded string is being used in the manifest files for our images, every time DIVA.js tries to construct the image url for a tile, it calls encodeURI on the image URL and thus attempts to use the wrong URL:
Given the example I provided above, the image tile URL looks like this after the above encodeURI call:
iiif.example.org/iiif/2/collection%252Fimage.jpg
This is because it took the percent sign already in the URI and replaced it with "%25" (the percent code for a percent sign). That URL, however, is invalid.
It would be nice if there was a flag we could pass into the options for the diva object to prevent it from encoding image URI's...
The text was updated successfully, but these errors were encountered:
We're currently trying to use DIVA.js to view some IIIF manifests. These manifests point to images being served by the Cantaloupe IIIF server, and by default, the path separator for Cantaloupe is "%2F", such that if you have an image at '/imageroot/collection/image.jpg', the "identifier" for that image would be:
iiif.example.org/iiif/2/collection%2Fimage.jpg
Given the fact that an already percent-encoded string is being used in the manifest files for our images, every time DIVA.js tries to construct the image url for a tile, it calls encodeURI on the image URL and thus attempts to use the wrong URL:
https://github.com/DDMAL/diva.js/blob/master/source/js/iiif-source-adapter.js#L19
Given the example I provided above, the image tile URL looks like this after the above encodeURI call:
iiif.example.org/iiif/2/collection%252Fimage.jpg
This is because it took the percent sign already in the URI and replaced it with "%25" (the percent code for a percent sign). That URL, however, is invalid.
It would be nice if there was a flag we could pass into the options for the diva object to prevent it from encoding image URI's...
The text was updated successfully, but these errors were encountered: