Is there a way to put a file from the server into an file type input tag via javascript? Just the way i change the value of a text type input, i want to insert a file to the file type input.
I already tried to do things like:
var _file = new File();
document.getElementById('fileInputId').files[0] = _file;
but it seems that the filelist property of input is protected and i cannot change the file objects inside it.
I want to bring a file from server and load it into the file input.
Is there a way to achieve this issue?
Thank y'all!