| Author |
creating thumbnail for uploaded files
|
J Das
Ranch Hand
Joined: Jul 27, 2011
Posts: 83
|
|
Hi all... I am working on a file sharing project .. Here users can upload / download files .. As in some file sharing sites i have seen when an user uploads a file (say an image file ) , he can view the thumbnail view of that file(image or video , whatever..) in his account.. So i want to achieve this..
the following is the jsp page where the user can upload a file by clicking on button..
The Upload file servlet code is shown below--->>
after doing this the file gets uploaded to the users account ( on the disc and the file path and file name is saved in database)... Now what i want to achieve is a thumbnail image to get created as soon as the file is uploaded and when the user opens his account , he views the thumbnail image of that file.. Please help me with detailed explainations and codes..
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
You'll ned to write some code to resize the image to create the thumbnail.
That has nothing whatsoever to do with JSP, so this post has moved to a more appropriate location.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
J Das
Ranch Hand
Joined: Jul 27, 2011
Posts: 83
|
|
Bear Bibeault wrote:You'll ned to write some code to resize the image to create the thumbnail.
That has nothing whatsoever to do with JSP, so this post has moved to a more appropriate location.
So where do i need to write those code ??
|
 |
Jayesh A Lalwani
Bartender
Joined: Jan 17, 2008
Posts: 1272
|
|
|
In your Upload servlet, put some code that will resize an image and save it in another file. In your JSP, provide a link to the resized image
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
J Das wrote:
Bear Bibeault wrote:You'll ned to write some code to resize the image to create the thumbnail.
That has nothing whatsoever to do with JSP, so this post has moved to a more appropriate location.
So where do i need to write those code ??
Code never goes in a JSP. Never. Ever.
Ever.
|
 |
J Das
Ranch Hand
Joined: Jul 27, 2011
Posts: 83
|
|
Bear Bibeault wrote:
J Das wrote:
Bear Bibeault wrote:You'll ned to write some code to resize the image to create the thumbnail.
That has nothing whatsoever to do with JSP, so this post has moved to a more appropriate location.
So where do i need to write those code ??
Code never goes in a JSP. Never. Ever.
Ever.
So while uploading the file ( say an image file )from the jsp page , when i pass it to a servlet , is that the servlet where that code will appear ?? Please ignore my dumbness if it is so..
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
Take a look here:
http://raulraja.com/2009/07/12/spring-java-thumbnail-generation-based-on-content-type/
WP
|
 |
J Das
Ranch Hand
Joined: Jul 27, 2011
Posts: 83
|
|
|
[UD: Content removed. Let's continue the discussion of your question in the topic you started: http://www.coderanch.com/t/592069/open-source/video-Thumbnails-video-sharing-site ]
|
 |
 |
|
|
subject: creating thumbnail for uploaded files
|
|
|