CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 File Upload - Writing/Retrieving from private folder

Print topic Send  topic

Author Message
Dreamcatchers


Posts: 120
Posted: 08/11/2009, 11:14 AM

I discovered that I could reference a file folder above the directory structure where my wesite domain points to. this is great as it prevents browsers from quessing file names and downloading.

for example:
domain.com points to c:/hosting/myaccount/domain_1

File upload using the file reference "../../docs" would place the file in the following location:

c:/hosting/myaccount/docs

My problem is accessing the files. I catalog the files in my database storing the filename. The program which provides the link to the file makes a relative reference based on my domain name. For example: http://www.mydomain.com/docs/filename.txt

I change the HTML where the link is by placing "../docs" in front of the filename reference.
for example:
<a href="../docs/{file_title_Src}"

I can not reference before the domain name. Is there a way programatically to create a link to the file?

If so I would improve security by having the files accessible only through authorized program access.
_________________
Training and LMS Developer
View profile  Send private message
jjrjr1


Posts: 942
Posted: 08/12/2009, 6:29 PM

You cannot access a directory above your domain using a URL.

Aall you have to do is write a CCS program to serve up the photo to the page. A php app as you mentioned can access that directory but you would need to use some sort of mechanism to open the file and serve it up with the proper mime type.

Here is an example using videos instead of images. Same Idea Though.

http://realtest.biz/viewconversion.php
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
Dreamcatchers


Posts: 120
Posted: 08/13/2009, 1:25 PM

Thanks for the input. I will search for components written in ASP to access and retrieve files from the server. My document directory store many types of files other than movies so the tool will need to be flexible.
_________________
Training and LMS Developer
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.