• 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

Error in Client-Server-Database File Upload

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day!

I am uploading files from the Client to the Server-Database. It works when the Client is also on the Server. But when it's on a different computer, I get a File Not Found error. I am using Apache Commons FileUpload and HttpClient.



Need your help.
Thanks.
[ September 12, 2007: Message edited by: Darren Alexandria ]
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears that you are attempting to read the data from a file on the local file system, not from the uploaded FileItem.

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
Can you please elaborate this:

It appears that you are attempting to read the data from a file on the local file system, not from the uploaded FileItem.



I don't really get it. I am sorry I am kinda slow on this. I have been struggling with this problem for 2 weeks now. And no matter how I read the API 's of FileItem or File, I still don't have an idea on how to solve this.

Thanks.
Darren
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This doesn't work when you have two machines because the file doesn't exist on the server. One may even ask why you are creating an instance of FileInputStream if you are not going to use it. Try removing that line.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh okay, I somehow get it. So I will remove this code?



Am I correct? And then I will replace it with something else?

Thanks so much for your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic