Open picture in the new tab
Answered
Thai posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
ThaiOP
I upload file image and then want to preview this pic in the new tab. I can go the new tab but I see about:blank not my url file. I must refresh page or enter url to see picture. If I don't click to refresh is can't to see preview picture.
this is my code
<a
href={file.URL}
target="_blank"
rel="noopener noreferrer"
className="cursor-pointer text-red-500"
>
Preview
</a>
this is my code
<a
href={file.URL}
target="_blank"
rel="noopener noreferrer"
className="cursor-pointer text-red-500"
>
Preview
</a>
![Image](https://cdn.discordapp.com/attachments/1152215297990856725/1152215298150256740/image.png)
Answered by risky
i know that this may not be the nicest solution but can you try this: https://ourcodeworld.com/articles/read/682/what-does-the-not-allowed-to-navigate-top-frame-to-data-url-javascript-exception-means-in-google-chrome (it makes a new window instead of new tab) - and it seems like it doesn't work for security
2 Replies
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
i know that this may not be the nicest solution but can you try this: https://ourcodeworld.com/articles/read/682/what-does-the-not-allowed-to-navigate-top-frame-to-data-url-javascript-exception-means-in-google-chrome (it makes a new window instead of new tab) - and it seems like it doesn't work for security
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
ThaiOP
thank you