• 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

file multiple on file hidden

 
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.
 
I do some of my very best work in water. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!