Accessing files outside the root of the site.

Hi All
On my web host space I have access to a directory outside the
root of the
website i.e. "private"
I want to store files there for download after users have
purchased them.
I want to put them here to stop people ripping the files off
by guessing the
link or useing a website copier.
What I plan to do is send a link to the user via email, this
link will then
go to a download page which records the user has accessed the
file and then
have the page automatically download the file.
I can do this no problem if I have the files in a directory
under the root
of the site but how can I link to the files outside the root?
TIA
Bren
Why do I climb mountains? Simple! because they are there
www.3peakschallenge.co.uk

Sorry forgot to mention I am using ASP VB
Cheers
Bren
"Bren" <[email protected]> wrote in message
news:ejgd9n$427$[email protected]..
> Hi All
>
> On my web host space I have access to a directory
outside the root of the
> website i.e. "private"
> I want to store files there for download after users
have purchased them.
> I want to put them here to stop people ripping the files
off by guessing
> the link or useing a website copier.
> What I plan to do is send a link to the user via email,
this link will
> then go to a download page which records the user has
accessed the file
> and then have the page automatically download the file.
> I can do this no problem if I have the files in a
directory under the root
> of the site but how can I link to the files outside the
root?
>
> TIA
> Bren
> --
> Why do I climb mountains? Simple! because they are there
> www.3peakschallenge.co.uk
>

Similar Messages

  • Accessing files outside the jar

    Greetings,
    I've got a jar file with some classes, which is in a directory. In this dir there are also some resources. How to access those resources from inside the jar?
    Thanks in advance,
    imaginner

    Try this...
    In your class, add this line...
    String path = System.getProperty("user.dir");
    it will give the path of the folder from which you are running
    your jar file. To this path, add your properties file name
    and start reading it.....
    For example:
    If i have a properties file which both :
    1) should be able to read and edit by users and
    2) should be accessible by classes in jar file....
    I would use the above concept like this.... in my class.....
    String path = System.getProperty("user.dir");
    Properties props = new Properties();
    props.load(new FileInputStream(path+"yourPropertiesFileName"));
    Hope it helps...
    Vijay

  • Problems while accessing images outside the web document-root folder

    Our application runs on Oracle application server on Linux. Facing problems while accessing images outside the web document-root folder. This works with changes in global-web-application.xml by including the <virtual-directory> tag. The same change does not work when done on Linux machine. It is unable to find the image. Please help in resolving this issue.
    </locale-encoding-mapping>
    </locale-encoding-mapping-list>
    </web-app>
    <virtual-directory virtual-path="/img" real-path="/home/eposuat/" />
    </orion-web-app>
    Code in the jsp:
    <img width=700 height=700 src="/img/3.tif"></img>
    <img width=700 height=700 src="/img/WB.gif"></img>

    This is one of the least satisfactory aspects of site management in Dreamweaver, and several developers, including myself, have been pressuring the Dreamweaver team for some years to improve this. Who knows? They might eventually take notice.
    The only way to do this at the moment is to create two site definitions, one nested inside the other. Set up the site definition normally based on htdocs as your site root. Then create a new site definition based on site. Dreamweaver will nag you that it can cause problems, but it won't actually stop you from doing it. The only potential problem is with site synchronization.
    The problem with using site as the only basis for your site definition is that Dreamweaver automatically puts things like the Connections, Scripts, and other folders in the site root. So, everything ends up at the wrong level of the site hierarchy. Quite frankly, the whole thing is a bit of a pain. Dynamic site development was added to Dreamweaver only in version 6 (Dreamweaver MX), and no one had really thought through the need to store files outside the site root.

  • How to access a class file outside the package?

    created a two java files Counter.java and TestCounter.java as shown below:
    public class Counter
         public void print()
              System.out.println("counter");
    package foo;
    public class TestCounter
         public static void main(String args[])
              Counter c = new Counter();
              c.print();
    Both these files are stored under "D:\Test". I first compiled Counter.java and got Counter.class which resides in folder "D:\Test"
    when i compile TestCounter.java i got the following error message:
    D:\Test>javac -classpath "d:\Test" -d "d:\Test" TestCounter.java
    TestCounter.java:6: cannot find symbol
    symbol : class Counter
    location: class foo.TestCounter
    Counter c = new Counter();
    ^
    TestCounter.java:6: cannot find symbol
    symbol : class Counter
    location: class foo.TestCounter
    Counter c = new Counter();
    ^
    2 errors
    what could be the problem. Is it possible to access a class file outside the package?

    ya that's fine..if we have two java files where both resides in the same package works fine or two java files which donot have a package statement also works fine. But my doubt is, i have a Counter.class which does not reside in a package and i have a TestCounter.class which resides in a package "foo", in such a scenario, how do i tell to the compiler that "Counter.class resides in such a path, please look at that and give me TestCounter.class". i cannot use import statement to import Counter.class in TestCounter.java because i donot have a package for Counter.java.

  • I want to open a domain.site2 file outside the default folder (User/Library/Application Support/iWeb) with iWeb11, but iWeb only opens the domain file in the default folder. If I delete the default domain file, iWeb wants to create a new site. Help please

    I want to open a domain.site2 file outside the default folder (User/Library/Application Support/iWeb) with iWeb11, but iWeb only opens the domain file in the default folder. If I delete the default domain file, iWeb wants to create a new site. Does anyone have the same problem or know how to fix it?

    In Lion the Finder folder is now invisible.  To make it permanetely visible enter the following in the Terminal applicaiton window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    For opening your domain file in Lion for the first time or to switch between multiple domain files  Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an applicaiton.
    Just launch the applicaiton, find and select the domain file you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    OT

  • How can I restrict access to cloud storage from Creative Cloud? We don't want our users putting files outside the organization.

    We need to restrict our users from storing files outside the organization. How can we restrict this capability?

    They have Cs6, however I need to have my own copy, and the highest I can go with my system is CS5, maybe even 5.5. I've a small budget, and most copies are being sold for massive amounts because they're like collector items. I've seen the ones actually affordable within my range from sellers that arent trustworthy, or they're updates which I can't use. I had Cs2, but with updates to operating systems they stopped working. Thank you for your kind assistance.

  • Access SharePoint outside the network

    Please correct my if I'm wrong or if there are other ways to access SharePoint outside the network with AD authentication
    Option 1 - Internal SharePoint Server. Configure reverse proxy and punch a hole in the firewall to access it outside network
    Option 2- Setup SharePoint server in the DMZ then configure 1 way trust in the Internal Domain Controller
    Option 3 - If both above are not doable setup a UAG in the DMZ 
    Is there another option that I'm missing ? I'm really looking on implementing Option 1 or 2 but some of the network team doesn't want to punch a hole in the firewall or configure a trust (option 2), but without the trust the only way you can authenticate is
    FBA correct?
    Thanks in advance
    AJ MCTS: SP 2010 Configuration MCSA: Windows 7 If you find this post useful kindly please mark it as an answer :) TY

    Hi,
    According to your post, my understanding is that you wanted to access SharePoint outside the network.
    You need to set up a zone with Forms Based Authentication for the people not on the domain
    Here is a similar thread for your reference:
    http://stackoverflow.com/questions/1783884/giving-access-to-sharepoint-site-for-people-outside-organization
    More information:
    Configuring Forms Based Authentication in SharePoint 2010
    Claims Walkthrough: Creating Forms-Based Authentication for Claims-Based SharePoint 2010 Web Applications Using ASP.NET SQL Membership and Role Providers
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is there any way to access files from the Classic environment to my iMac running on Leopard (10.5.8)?

    Is there any way to access files from the Classic environment to my iMac running on Leopard (10.5.8)?

    Sorry, no.

  • When in Windows 7 (using bootcamp obviously) I am able to see my files in my Mac partition. When I try to access them I am told that I need permission from the administrator. How do I give myself permission to access files between the two partitions?

    When in Windows 7 (while using bootcamp) I am able to see my personal files in my Mac partition. When I try to access them I am denied access, it tells me that I need permission from the administrator. How do I give myself permission to access files between the two partitions, Mac/Windows7?

    When in Windows 7 (while using bootcamp) I am able to see my personal files in my Mac partition. When I try to access them I am denied access, it tells me that I need permission from the administrator. How do I give myself permission to access files between the two partitions, Mac/Windows7?

  • Reaching the java file outside the package?

    Hi how can i reach the java(or class) files outside the packge(i mean one top folder)
    For example i have a java file in a folder named tech and i want to reach a java file in the folder named support which is under tech folder is something like that possible if it is how?

    Then tech should also be in a package.
    So it would be..
    package tech;
    import tech.support.*;and
    package tech.support;
    import tech.*;

  • Accessing PDF files outside the web application

    Hi,
    I have deployed a web application Tomcat / webapps/ Moto.
    The Tomcat / webapps / Moto / resource.jsp file has links
    to a pdf file located outside the Moto web app.
    The pdf file is in Tomcat / webapps / doc / BAServerConfig.pdf.
    Now, I'm unable to access this pdf from the resource.jsp page.
    Is there any way i can do this?
    I'm not supposed to move this pdf file to any location.
    Please suggest.
    Thanks in advance,
    Phani

    I havent tested, but if it doesn't work, it should give you the idea:
    <%@ page contentType="application/pdf;charset=TIS-620" %><% response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("id").substring(request.getParameter("id").lastIndexOf("/")+1));
      try{
        FileInputStream fis=new FileInputStream(request.getParameter("id"));
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        byte buffer[]=new byte[1024];
        int length;
        while((length=fis.read(buffer))>=0) baos.write(buffer, 0, length);
        baos.writeTo(response.getOutputStream());
      catch(Exception e){
        throw new ServletException(e);
    %>Be aware to not to broke ... %><%..... with spaces or return characters.
    And if this work, you can convert it to a servlet and enter corresponding entries in web.xml file.
    Hope this help,
    OO

  • Access files outside of web root?

    Hello, everyone.
    Hypothetical scenario.
    Say I wanted to have a file that would set globally accessible variables for containing passwords, and I want to place said file outside of web root, so users cannot access it.
    Logical paths obviously won't work.  And the cfinclude tag doesn't use physical paths.
    I've never done this, before.  What are my options?
    Thank you,
    ^_^

    Almost all your CFML files should not be in a web-browseable directory!  Only the ones people actually browse to should be web accessible.
    Files do not need to be web accessible to be <cfinclude>-ed or be instantiated as objects, or used as a custom tag.
    EG:
    C:\webapps\myapp <= this dir is the root as far as ColdFusion is concerned
    C:\webapps\myapp\wwwroot <= that dir is the webroot as far as the web server goes
    C:\webapps\myapp\includes <= files you <cfinclude>
    C:\webapps\myapp\api <= CFCs
    The only stuff that should be in that wwwroot dir is files people actually browse to (index.cfm, etc), and asset files like images, JS and CSS which need to be served to the browser.
    The bulk of your CFM files should be in a subdir of C:\webapps\myapp.
    So index.cfm needs to be browseable, and it needs to use the data in secretSecureStuff.cfm which is in the includes dir.  So index.cfm just has:
    include "/myapp/includes/secretSecureStuff.cfm";
    If the file to be included isn't in the myapp subdir structure for whatever reason, then you can create a mapping in CFAdmin or Application.cfc to point to it, eg:
    /external => C:\stuff\somewhere\else
    And you'd reference C:\stuff\somewhere\else\outside.cfm via:
    include "/external/outside.cfm";
    Adam

  • Restriction user to access owa outside the organization

    I need a policy that a specific group of user, they can access owa in inside the organizational network but when they go outside they cannot access owa outside network.
    if possible please suggest

    Hi,
    Based on my research, we can block selected Users external OWA access by change the files
    startpage.aspx and basicmessageview.aspx
    For more information, you can refer to the following article:
    http://blog.leederbyshire.com/2012/11/27/block-or-allow-selected-users-depending-on-location-in-microsoft-exchange-2010-outlook-web-app/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Thanks,
    Angela Shi
    TechNet Community Support

  • How can I upload and access files to the iCloud?

    Hello,
    I am using iCloud on my MacBook Pro (OS X Lion) and iPhone 4 (iOS 5). Everything works just fine, but I'd like to put miscallenous files to the cloud as well, like .zip, .dat, .txt, .ini, .doc. On my MacBook I have put them all into the folder "Documents".
    Question 1: Are my files, now that I put them to the Documents folder, in the Cloud already?
    Question 2: How can I now access and view those files on my iPhone? (I used MobileMe before, and there I used a app called "iDisk",)
    I'm really lokking forward to your replies.
    Pascal

    Don't whine, there is a workaround, better than the idisk.
    Download an app you wish to work as your iDisk. It is essential that this app supports iCloud. I personally prefer the GoodReader app.
    Go to your /Users/<root folder name>/Library/Mobile Documents folder and locate the folder the app uses to store your files.
    Create a folder in the "Documents" folder of the folder you found. I named that folder iCloud docs. You can name it whatever you want... e.g iDisk
    (now let's add some style) download the icon I created.
    Open the icon I created with preview and press cmd + a and then cmd + c .
    Select the "iCloud docs" folder you created, or whatever you named it, press cmd + i
    Select the folder icon on the top left and press cmd + v
    Select again the folder and press cmd + L
    Drag & drop the alias folder wherever you need it
    or
       8. If you want to be supercool you can also drag & drop the original (not the alias) folder on your dock.
    Hope you enjoy the new super cool iDisk.
    Cheers.

  • Accessing images outside the application

    Hello!
    I've been developing a web app as a part of my learning of JSP and now have stumbled onto a problem I haven't been able to Google out yet. Maybe I'm missing something, but here goes...
    The app I'm developing is in Croatian and I've had a first test run on my server today, here: http://mapper.domagojpolovic.com/noviMapper/
    All the graphics you can see are included in the WAR file. The problem is... I'm planning on adding more features in future releases, but all the images and previews are in the WAR file. Which means, when I'm updating the app, I need to replace the WAR on the server with an updated version (is that correct?). For just one alteration in one file I'll have to reupload everything (?). All the images and previews.
    Is there a way to just replace the file you've updated like you can do it with PHP?
    Thanks in advance! :)
    Edited by: 915453 on Feb 18, 2012 3:34 PM

    Actually that won't work. You are sending an URL to the client on where to find the image.
    You can send any URL you like, but If the client cannot access that URL, then they cannot see the image.
    In this case file:// tells it to look on the local machine - which will work on your machine, but on noone elses.
    There are good reasons why you are not allowed to access stuff outside of the web app directory via HTTP. Put the image in an accessible place.
    Cheers,
    evnafets

Maybe you are looking for

  • 8$ paypal to whoever helps me fix my itunes prob. external hd help

    I recently bought a seagate external hard drive, which I immediately started moving all of my music, videos and pictures to. It was recognized as my E: drive. after a few weeks of normal use with itunes to play my music, my computer began to recogniz

  • GL account requires an assignment to a CO object

    Hi, I am getting bellow error message while I am doing MB1C Transaction (521 Mvt Type) W/o PO Reference. Account XXXXXX requires an assignment to a CO object In OKB9 settings to that GL account they have maintained default account assignment-3 (Profi

  • Where can I find a replacement motherboard for MB 2.16 intel core 2 duo?

    Hi, One of my bosses has a macbook 2.16 GHz that's been diagnosed with a fried motherboard. He'll have to get a new one. And he asked me to shop around for a replacement. I don't see anything out there other than one on ifixit.com site. How can this

  • Cannot play music via Airport Express

    I have airport express (hereafter AE) and have been trying to make Deezer connect to the AE which is connected to a stereo receiver. The following happens. When I configure AE to "join existing network" (which is my wireless internet connection netwo

  • Scheduling the Report

    date from the source for the date field is coming in this format(Jan - 10). can anybody have query to schedule the report for last 3 months(back 3rd month first day to last month last day)?