• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating thumbnail for uploaded files

 
Ranch Hand
Posts: 83
MS IE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
J Das
Ranch Hand
Posts: 83
MS IE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ??
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 83
MS IE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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..
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look here:

http://raulraja.com/2009/07/12/spring-java-thumbnail-generation-based-on-content-type/

WP
 
J Das
Ranch Hand
Posts: 83
MS IE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[UD: Content removed. Let's continue the discussion of your question in the topic you started: https://coderanch.com/t/592069/open-source/video-Thumbnails-video-sharing-site ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic