How to view file when clicked?
Moderator: General Moderators
-
rickburgen
- Forum Newbie
- Posts: 10
- Joined: Thu Mar 05, 2009 5:41 pm
How to view file when clicked?
I built a website that allows users to upload files to a personal folder. I developed the so far, so that the user can see which fille they uploaded. Now, I want to add the functionality so that when they click the link(their file) it shows them what it is. Like quick look for OS X. I hope I got my point across. How would I go about this? Thanks.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: How to view file when clicked?
I dont know OSX but you could force the download?
http://www.forum.jaoudestudios.com/view ... e+download
http://www.forum.jaoudestudios.com/view ... e+download
Re: How to view file when clicked?
now that would depend the kind of file uploaded. if it's a simple text file or a doc file you could open it up for the user but in case of multimedia files, it might get difficult. what you could do is show user the file details first like the upload time, type of file, file description etc., and you can provide a download option along with it for the user there.
-
rickburgen
- Forum Newbie
- Posts: 10
- Joined: Thu Mar 05, 2009 5:41 pm
Re: How to view file when clicked?
I don't want the user to have to download the file after they just uploaded it., that would be a major inconvenience and would probably drive them away from the site. How would I get the date of when the file was uploaded, and size, and type? Are there built in methods? At the current state of the links, when they are clicked it asks if I want to download it, but the type is Untyped Binary Data. I never heard of that.