Categories
html image indexeddb javascript jquery

Using IndexedDB to save images

<img src="https://www.faqcode4u.com/faq/411961/picture_1.png" id="imgHolder"/>

Would like to save image with indexedDB in database named Images on button click.

<button id="write" onclick="saveToDB()">Save To DB</button>

Another button will read image from Images database to display in <div id="resultContent"/>.

<button id="read" onclick="readFromDB()">Read from DB</button>