Skip to main content
Participating Frequently
March 17, 2022
Question

linking to a folder in Dreamweaver

  • March 17, 2022
  • 4 replies
  • 537 views

My site is on GoDaddy. I added Directory Privacy to a members-only folder. Once logged in, I have a link on the member page to a folder that, when accessed, will show the documents within for members to download. When I open locally within my browser, seems to work fine. But on-line, when I select the hot-link, I get a "FORBIDDEN - you don't have permission to access this resource. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request" 

 

I have been on tech support for GoDaddy and with Adobe for many hours, with no solution, other than typing each document's name and linking each line to its related document, not feasible. I have to believe what I want to do must be possible and not very complex. 

    This topic has been closed for replies.

    4 replies

    Community Expert
    March 18, 2022

    As said @Nancy OShea , scandir() is a way to go for listing files.

    However, I have two questions concerning your private access, and files downloading process :

    • You want to create a member area to allow access to certain files. That's fine. But do all members access the same files? or said differently, do members have the same profile ?
    • You specify that members can download these files. The question is, how many files are are available for download ? Because then, that drives to a possible ergonomic problem which is that :
      - if the user wants to download a unique file, it translates into one click plus a save as dialog box,
      but
      - if the user wants to download several files it translates into as many clicks, plus save as dialog, as needed. In that case, the use of a single collection basket should be considered.
    Participating Frequently
    March 18, 2022

    Thanks, Nancy. These folders just contain sheet music PDFs and learning tracks for new music. Not a big deal. One folder might have 30 files, another 25 and members will probably only download a few at a time. This weekend I will try your suggestions. I really appreciate your help. 

    Community Expert
    March 18, 2022

    No problem, I understand your process modeling better. If you need it, I had to develop this kind of functionality for different applications. Adapting it would not be complicated.

    Nancy OShea
    Community Expert
    Community Expert
    March 18, 2022
    quote

    no solution, other than typing each document's name and linking each line to its related document, not feasible.


    By @Mr Thackston

    ==========

    To do this manually, drag & drop files from Files Panel into Design View.  For best results, begin with a basic stucture like an unordered list.

     

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    March 17, 2022

    This link has code examples with recommended use cases:

    https://code-boxx.com/list-files-folders-php/

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    March 17, 2022

    For web security reasons, directory contents should not be displayed by servers.  GoDaddy is exercising best practice by making this forbidden. 

     

    As a workaround, create an index.php page in the Member's only folder.  

    The scandir() function in PHP is used to return an array of files and directories from a specified directory.

    https://www.php.net/manual/en/function.scandir.php

     

    Nancy O'Shea— Product User & Community Expert