2

I'm trying to set an image in file input (HTML input file type) without using the input up-loader (set the file programmatic).

I have found useful links about using the clipboard and data transfer but it is not working on Internet explorer. There is any solution that can be used in Internet explorer?

var dT = new ClipboardEvent('').clipboardData ||new DataTransfer(); // specs compliant (as of March 2018 only Chrome)
dT.items.add(new File(['foo'], 'programmatically_created.txt'));
inp.files = dT.files;
1
  • Have you reviewed this post? Commented Apr 7, 2019 at 8:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.