Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Preview for files on MySql Query

Posted on 2012-03-29
5
300 Views
Last Modified: 2012-04-16
Hello Experts,

I'm running a simple query to display data from forms onto HTML pages.  

I'm looking for a way to display a "preview" of the file that's getting uploaded using the forms. Forms have these fields: Date, name, author, description and upload file (files are stored on database).  The type of files that are getting uploaded are: PDF, DOC, XLS, JPG, GIF, MPG4 and SWF.

The idea is that on the HTML pages, other than the other info,  visitors are also able to see a small "preview" of the uploaded file.

How can I do this? Thanks!
0
Comment
Question by:Jacko_Pinto
  • 2
  • 2
5 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 37788265
There is not any really good answer for this question, especially if you want to accomplish this in real time.  If you have a web page that displays the information you may be able to get something from this site.  It has worked for me in the past, though not in real time.
http://www.shrinktheweb.com/

My general recommendation for something that can provide a fairly good UX would be to have 32x32 pixel icons that represent the different types of files.  You can display the icon and make it a link to a new window that access the uploaded file.  The client already knows what she uploaded, and the icon and link serve to provide an easy way to verify that the upload worked correctly.

Failing that you might be able to try to stuff the uploaded file into a small <div> or iframe.  But I do not think I would be comfortable with that approach.

Best of luck with it, ~Ray
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37788422
Maybe generating a thumbnail images per upload with PHP or any other server side script would be an alternative?

CyanBlue
0
 

Author Comment

by:Jacko_Pinto
ID: 37788912
Thanks Ray_Paseur,

I'll look into the options.
0
 

Author Comment

by:Jacko_Pinto
ID: 37788919
Thanks CyanBlue,

Can you please suggest a script that might work best for this?

Regards.
0
 
LVL 37

Assisted Solution

by:CyanBlue
CyanBlue earned 250 total points
ID: 37791641
As far as I am aware, there is no one script that can do all that, and honestly, I am not sure if you can create thumbnails from all those file types you've mentioned.

My suggestion is google for something like 'php create dynamic thumbnail from image' and learn the techniques that you need to do the job and then find other classes that supports other file formats.

CyanBlue
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question