aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes creating thumbnail for uploaded files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "creating thumbnail for uploaded files" Watch "creating thumbnail for uploaded files" New topic
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: 60077
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 2065
    
  22

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: 60077
    
  65

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating thumbnail for uploaded files
 
Similar Threads
how to know which servlet/jsp calling a particular servlet
Fieldset is not working
Fieldset is not working
Image Uploading in database through JSP
set values in a table from other