Solved

Preview for files on MySql Query

Posted on 2012-03-29
5
299 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 49
google analytics in wordpress 4 35
FrontEnd tools to create web database application 7 59
Number of hours between date in DB and now 8 18
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

773 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