Uploaded Files Not Saving

Hello all!

I have a form that has a multiple uploads field in which images are uploaded. When the page refreshes, or the user continues to checkout and then clicks the browser’s back button, the multiple uploads field is cleared.

I wrote some custom code to save the entire form in local storage and fill out the form after refresh, but when I try and proceed to checkout, I receive an error (validation_message) in the multiple uploads field: “You must upload at least 1 image to continue.” even though I have restored all images back into the #gform_preview area.

Additionally, if I upload an additional image to the multiple uploads area, I can then proceed to checkout, but the images restored from local storage are not present.

I’ve been looking at the DOCS to no avail; specifically the FileUpload Object… I just can’t figure out where, or which hook to use to modify this object. I also found the object stored in gform_uploaded, which allow me to pass to checkout if I copy and restore from local storage, but then checkout shows no uploads.

I have even tried :

gform.addFilter( "gform_file_upload_markup", 
function( html, file, up, strings, imagesUrl ) {`
// set data and restore image obj to gform_uploaded on page load
sessionStorage.setItem("uploads",up);
return html;
} );

How can this uploaded data persist through refresh and page reload, and be recognized by Gravity Forms as present?

Thank you so much for the help!

Anyone have any ideas? I still have not figured it out.