Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Uploading and Retrieving USB files  RSS feed

Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a servlet program that uploads files (pdf, doc, txt, etc.) to the server. The program works fine and is successfully loaded when the file is from a local drive (hard disk, cd, floppy) or even in a network file (files coming from a client drive) and also a file coming from a memory stick (USB files)
I also created another program that does the openning of the file from the server using the of JavaScript and it works fine when the file is coming from a hard disk, cd, floppy.
I have problems in openning the USB uploaded files. It says that the file is corrupted.
I tried transferring the USB file to the hard disk upload it using the servlet (it was successfully loaded) but when I open the file the same error is being prompted.
What seems to be the problem?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!