• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

file multiple on file hidden

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody, I need copy each item from one multiple file in separated simples type file, and submit them to the server (tomcat, jsp). My code en jsp:

1) input multiple="multiple" type="file" id="fileMultiple" ...

2) 10 different input type="file" name="file_hidden_1 (2, 3, ...)"

3) In jscript, inside a iteration for(var i=0; ...

3.1) document.getElementById('file_hidden_' + (i+1)).files[0] = ficMultiple.files.item(i);

I do this for to submit each file via ajax (DWR3; FileTransfer) using only one user selection of files. But the files arrive to the server without name and 0 bytes.

The question: Somebody make this 3.1) line correctly? I attempt too modify the value of each hidden but don't works. Any idea?

Thanks in advance.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic