Jump to:

10931 Posts in 2614 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Image Collection problem - directory listing denied

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1307 Views
  • qlex
    Avatar
    Community Member
    68 Posts

    Image Collection problem - directory listing denied Link to this post

    Hi,
    installed the module, created a new page and added two images through "Images" tab.
    When trying to view the published page i get:

    Directory listing denied.

    The url created is /my_website/foto/. Module is in root directory under its standard image_collection name.

    thanx for any hints,
    qlex

  • TheRealBrian
    Avatar
    Community Member
    1 Post

    Re: Image Collection problem - directory listing denied Link to this post

    I ran into the same problem so I searched the sources for "directory listing denied" and here is what I found.

          public function index(HTTPRequest $request)
          {
             // return 403 error if indexing is not allowed
             if(!$this->AllowIndex)
                return new HTTPResponse(_t('ImageCollection.ERROR403', 'Directory listing denied.'), 403);
             
             // render page
             return array();
          }

    In the admin section, the content tab of the page you created will have a checkbox for Allow Index, also labeled "When indexing is allowed, an index page with all images will be displayed if the page URL is loaded directly." Check this box and you will be able to go to the page. Otherwise, I believe you need to add the filename of the image you want to see.

    1307 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.