• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

file multiple on file hidden  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!