Display file if possible, otherwise download
Posted: Wed Dec 29, 2010 9:39 am
I am currently making a media holder website. On this site, there will be lots of types of files, such as .swf, images, etc. I have the files being uploaded to a directory that is not in the server root so that people can not directly access the files, you have to download them from the site.
I also want to have a preview option though. I would like to be able to display a flash banner without using the html markup, just so people can see what it is.
Problem though is that the files are not in the web root. Here is the folder structure:
files/
public_html/
So, how can I read a .swf file (or .jpg) to the browser without it accessing it directly?
I also want to have a preview option though. I would like to be able to display a flash banner without using the html markup, just so people can see what it is.
Problem though is that the files are not in the web root. Here is the folder structure:
files/
public_html/
So, how can I read a .swf file (or .jpg) to the browser without it accessing it directly?