Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Preview for files on MySql Query

Posted on 2012-03-29
5
Medium Priority
?
307 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
[X]
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
  • 2
  • 2
5 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1000 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 1000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

610 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