javascript - View A Base64 Encoded Page -


might general question anyway.

i have link file on server base64 encoded. able view file decoded.

in order achieve this, downloading file content inserting like

<a href="data:image/png;base64,...(base64-encoded file content goes here)..."   width="70" height="38" alt="image embedded using base64 encoding!"></a> 

then opening link view file.

i wondering if there maybe more elegant solution? instance, can view original link decoded passing in parameter link or such?

ideally looking way view without having download , decode via javascript.

try <img src="data:image/png;base64,...(base64-encoded file content goes here)..." />

live demo:

https://jsfiddle.net/anzrrogs/


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -