0

I have this Data URI that it's fetched dinamically in my server, along with the filename, but when I click on the anchor element it gives me the "Not allowed to navigate top frame to data URL" and upon searching about it none of the code provided works. The thing is it works here in this snippet below. I can confirm with Inspect Element that on my page both the URI and the download attribute are being set one second after the page loads. I'm on Chrome 79.0.3945.130.

<a href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAQMAAAB3bUanAAAABlBMVEX///8AAABVwtN+AAADGUlEQVR4nO3dMW6jQBSAYSIXKfcIPoqPBkfjKBzBpYsorIDiPQ0DOMqulni/vzKYeR9uRwg3jSRJkiRJkiRp6jo+01CsupQXzGd/PTXrTqfT6XQ6nU6n0+l0Op1Op9PpZ9Q/mu1CfyvndNPZ90L/3JnV0ul0Op1Op9PpdDqdTqfT6XQ6fUe/FcPvhZ7a2SX+jLGpB51Op9PpdDqdTqfT6XQ6nU6nv4Se9mnTxm59n5ZOp9PpdDqdTqfT6XQ6nU6n0+l/Xm/iKjqdTqfT6XQ6nU6n0+l0Op1Of1G9XujLPm0fX7Uxt9Tr0el0Op1Op9PpdDqdTqfT6XQ6va4fVurLew+66WO5S3wYnU6n0+l0Op1Op9PpdDqdTqefTf9yt2nC3sbuX41Op9PpdDqdTqfT6XQ6nU6n019Ov46bpfcepPpY207Hj7hqXrDsJQ/Tx0ssWPaSOzqdTqfT6XQ6nU6n0+l0Op1O/5F6tHqetlp680C66hG3++TTvHQ6nU6n0+l0Op1Op9PpdDqd/v/pfZxtt+fe4kQ3HS/7v/NX6b0HQ+h9XLX6UXQ6nU6n0+l0Op1Op9PpdDqdfhr9I+ZubKhGSa+2+i+tvbF0Op1Op9PpdDqdTqfT6XQ6nU5PetnhH3N101Vpl3guvfdgdbtdSdDpdDqdTqfT6XQ6nU6n0+l0+hn0L7R688CRnp6n/X50Op1Op9PpdDqdTqfT6XQ6nf6i+nV8pqHQl9rpeHlSdv7qvj1273laOp1Op9PpdDqdTqfT6XQ6nU4/g15/nraJucPOBUVv1dun0+l0Op1Op9PpdDqdTqfT6XT6sX4rVtwLfW9uWhBjl/qdW6XT6XQ6nU6n0+l0Op1Op9Pp9J+rLwva6u3Egkt5j3Q6nU6n0+l0Op1Op9PpdDqdTv++3hcD3uez88f0119JLxfQ6XQ6nU6n0+l0Op1Op9PpdPqJ9XqlPsaCdtws6amOTqfT6XQ6nU6n0+l0Op1Op9PpVf2wuj6XdombuGqIE7fp+FH/aXQ6nU6n0+l0Op1Op9PpdDqdfgZdkiRJkiRJkvSv+g1+wI6nP+AHdQAAAABJRU5ErkJggg==" download="image.png">Download</a>
DarkCeptor44
  • 184
  • 3
  • 15
  • Whats your question? – King11 Jan 27 '20 at 22:16
  • @King11 I want to know why it's not working on my server where the data URI is passed to the page dynamically. – DarkCeptor44 Jan 27 '20 at 22:18
  • Try this method in your code: https://ourcodeworld.com/articles/read/682/what-does-the-not-allowed-to-navigate-top-frame-to-data-url-javascript-exception-means-in-google-chrome Or the solution in this question: https://stackoverflow.com/questions/45493234/jspdf-not-allowed-to-navigate-top-frame-to-data-url – King11 Jan 27 '20 at 22:20
  • @King11 that opens the new window with the picture but it doesn't show the Save As dialog like it does in my snippet, and it does not even allow CTRL+S either. – DarkCeptor44 Jan 27 '20 at 22:40

0 Answers0