1

I have two type of input one is file type and second is hidden type. I have value in hidden type and i want to set value in file type.

This code use in drag and drop file upload. If hidden type input send file all attribute that is good for me because i need file attribute in submit function. How to get file name and lastmodifydate etc....

<form action="/upload?X-Progress-ID=1" enctype="multipart/form-data"  method="post" id="form_upload" target="iframe_upload" style="display:none;">
    <input type="file" name="upload" id="upload" data-buttonText="" onchange="submitForm()" class="filestyle" data-badge="false"><br>
    <input type="hidden" name="filesender" id="filesender" >
</form>
5
  • In your code I don't see value in your hidden input. And for security reasons it is forbidden to write value in input file, you can read value but not write into it. I think your real goal is to get the filename from the inputfile and put it in the hidden input ? Commented Oct 28, 2015 at 7:02
  • You can check this answer on stackoverflow, It should help you : link to the answer Commented Oct 28, 2015 at 7:14
  • 1
    Hi Gueras Arnaud, I have file in hidden input but hidden input don't get file name and some other attribute than if i set hidden input file into inputfile then i get all attribute.. Commented Oct 28, 2015 at 7:18
  • 1
    I am able to get file name when file in inputfile but i can't able to get file name when file in hidden input Commented Oct 28, 2015 at 7:20
  • 1
    How to access file name and other attribute from input type is hidden Commented Oct 28, 2015 at 8:18

1 Answer 1

0

You can't set data using drag and drop in input hidden filed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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