Results 1 to 7 of 7
Thread: Urgent
- 03-07-2012, 01:53 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 21
- Rep Power
- 0
Urgent
Hello Friends,
I am in a serious trouble..Someone please help me..
Our team is currently building a web application which contains image upload module which I am resposible for coding. Image upload comes in place where user add his profile photo.
I just need to give the end user the option to upload a file which I already did .
<form action="upload.jsp"
method="post" enctype="multipart/form-data">
Select a file:
<input type="file" name="first" />
<br />
<input type="submit" name="button" value="upload" />
</form>
Now what I want is the coding part to upload the file to a temperory folder in server(ofcourse I need to create a folder first) and I need to store the url for the data path in database.
I also need the coding to retrieve the url from the database and display the corresponding image to the end user like facebook do.
Anyone please help me...
Thanks in advance..Regards
Naveen
- 03-07-2012, 01:55 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Urgent
What does your servlet currently do?
Are you using an existing mime-multipart package (like Apaches one)?
Will the image be stored in the database?
If so why have a temporary folder?Please do not ask for code as refusal often offends.
- 03-07-2012, 02:00 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,380
- Blog Entries
- 7
- Rep Power
- 17
- 03-07-2012, 06:46 PM #4
- 03-07-2012, 06:59 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,380
- Blog Entries
- 7
- Rep Power
- 17
Re: Urgent
Sure; show at eleven, popcorn and beer can be bought in the corner on your left side; don't throw anything towards the vict^H^H^H^Hparticipant and please don't touch anything while the rotating knives machine is operational; how many tickets do you want? enjoy your evening.
kindest regards,
Jos ;-)When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-13-2012, 06:49 AM #6
Member
- Join Date
- Mar 2011
- Posts
- 21
- Rep Power
- 0
Re: Urgent
When I search on google, I found two options.
First one is, You can store the image in database. But this seems to be a bad idea because user can upload image of any size
to the database. Since I am using MYSQL database, it is not practical.
Second option is upload the image to server and put the corresponding url in the database. Server will handle huge amount of data as compared to MYSQL database.
regards
Naveen Paul.
- 03-13-2012, 11:08 AM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Similar Threads
-
[URGENT]SHA Encryption System...need urgent helps
By java_idiot in forum New To JavaReplies: 6Last Post: 05-02-2010, 10:04 AM -
Urgent
By Anchal in forum Java ServletReplies: 1Last Post: 04-10-2010, 05:35 PM -
Urgent ???
By programmer_007 in forum EntertainmentReplies: 0Last Post: 04-02-2010, 11:49 AM -
Help. It's urgent
By monir6464 in forum AWT / SwingReplies: 2Last Post: 08-24-2008, 05:57 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks