• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in Client-Server-Database File Upload  RSS feed

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • 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 ]
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!