hi, when i try to upload a file along with html form data,am using enctype="multipart/form-data" in the form tag to upload a file.but when i use enctype="multipart/form-data" am unable to get form data.its showing null values.when i remove the enctype attribute from form tag its working fine,but unable to upload the file.pls tell me what might be the reason...am geting frustated with this prob...pls help me out....
lots of thanks in advance
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
posted
0
when i remove the enctype attribute from form tag its working fine,but unable to upload the file
Could you please explain as what exactly is failing.
" Its working fine ,but unable to upload a file" - then how is that working fine ?
This might be useful. [ July 26, 2007: Message edited by: Rahul Bhattacharjee ]
i have html form values(ex:username,password,location,ph no,etc.,)and also browse file option.when i put the attribute enctype="multipart/form-data" in the form tag,the form values(ex:username,password,location,ph no,etc.,)are going as null to database but the file is getting uploaded.when i remove the "enctype" attribute from the form tag all the form values are getting stored in database but the file is not getting uploaded.how can i resolve this......
thanks for your interest
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
posted
0
What are you doing on the server side to read the multipart data coming from the browser ? [ July 26, 2007: Message edited by: Rahul Bhattacharjee ]
thanks a lot for your reply.can i have the documentation or a link regarding that so that it will be easy for me.am trying for this since 10 days but of no use..
pranith nani
Greenhorn
Joined: Jul 26, 2007
Posts: 7
posted
0
am preparing a page similar to naukri.so i need to get the user details(like email,phno,skillset,etc.,)along with his resume.i am storing the files in a specified path and the form values in the database...this is the theme of my work
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
posted
0
I have already sent you the link in my first post. You might also have a look in Javaranch's FAQ.
You have to pick an upload library and read the documentation that comes with it. Personally, I use Apache Jakarta Common's 'fileupload' which has simple examples in its documentation.