aws-samples / amazon-a2i-sample-task-uis

Over 60 example task UIs for Amazon Augmented AI (A2I)
https://aws.amazon.com/augmented-ai
Apache License 2.0
91 stars 30 forks source link

Embedding pdf in iframe #6

Open meketadev opened 3 years ago

meketadev commented 3 years ago

I am trying to embed a pdf in an iframe as shown in the text sample for document classification. The browser is is displaying a grey image with the text "Requests to the server have been blocked by an extension". I have disabled all extensions and believe this could be fixed by adding: "web_accessible_resources": [ "modal-iframe.html" ],

to the manifest.json. However I do not know where this could be done in the creation of the Human review workflows or task templates.

athewsey commented 2 years ago

+1: I'm seeing same/similar issue with PDFs failing to display - but seems to be browser-specific as Firefox users are OK but Chrome blocks it.

For me the error (in Chrome) looks a little different to the description above: "This page has been blocked by Chrome" - but I imagine the underlying cause is the same:

image

I wasn't able to find much info from devtools in the labelling view as to why the resource was blocked, but I see that the template as a whole is loaded in an <iframe sandbox="allow-scripts" referrerpolicy="no-referrer">: So not sure how this could be worked around?