This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Problem in Uploading files other than text files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in Uploading files other than text files" Watch "Problem in Uploading files other than text files" New topic
Author

Problem in Uploading files other than text files

nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
hi all ,i am facing a problem with Uploading

image files,mpeg and pdf files
After uploading an image file i get a blurred

image on the server side
In case of movie file i am unable to open it
Please do help me
The following is my front end jsp file





ProcessFileUpload.jsp is as follows






















Please do help me
Thank you in advance
nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
can anyone please give me your suggestions??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Please read this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
You are using a Reader and Writer - these only work for text files because they do character conversions on the fly.



Bill
nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
Thank You for your reply Mr.William Brogden .Can you please tell me what is the statement that i should use instead of those two lines?
nidhivel raja
Ranch Hand

Joined: Jun 26, 2008
Posts: 36
I apologise for my behaviour Mr.Bear Bibeault
I was in a hurry to complete my project.i will surely be patient in the future.Thank you for correcting me
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Originally posted by nidhivel raja:
I apologise for my behaviour Mr.Bear Bibeault
No need to apologize. The guidelines are there to help you. Ticking people off by bumping threads before members from all over the globe may have a chance to answer doesn't help you get your answer faster.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Can you please tell me what is the statement that i should use


No

Because you realllly need to learn more about Java IO - review the JavaDocs for the java.io package and work through this tutorial. You will save time in the long run by making fewer mistakes with respect to character and binary IO processes.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Uploading files other than text files
 
Similar Threads
http status error 404
Jakarta FileUpload
Upload files from client
problem with commons FileUpload
Upload Files in User Defined Directories/Database