I have successfully stored a base64 image to the local storage.
I have tried and failed in adding the stored value to an input file field.
document.getElementsByName("inputfieldname")[0].setAttribute("value", getSavedValue("thesavedkey"));
<input type="file" name="inputfieldname">