1

I want to set file object which i had uploaded into another

<input type='file' name="file" id="fileid" />

I had also tried with

$("#fileid").attr("files",fileObject);

but it doesn't work. Is there any other solution to set file object into form input field??

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247
Anshu Dahiya
  • 69
  • 1
  • 6

2 Answers2

0

The HTML-standard does not allow you to change or pre-set anything in a file-input-tag. So it's not possible to set a file by default (I think it's because of the security).

appnic
  • 344
  • 1
  • 10
0

It's possible as i had fixed this issue using angularJS. Earlier file content are posted blank rarely with particular situation, Now it will not send blank data which are injected with angularjs and updated FORMDATA().

Anshu Dahiya
  • 69
  • 1
  • 6