Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the exact same requirement.

    Plugin Author Adam Bissonnette

    (@mmanifesto)

    Ah crap – sorry for the late replies. My notifications haven’t been working!

    You can totally load files from outside the uploads directory just preface the path with enough “../../” and you should be good to go.

    Say for example you want to list files in a directory like this:

    yoursite.com/files/

    Since your uploads directory is going to be something like this:

    yoursite.com/wp-content/uploads/

    You can setup your shortcode to look like this and you should be good to go:

    [MMFileList folder=”/../../files/” format=”table” types=”png” /]

    Keep in mind that if the files you’re listing are below your root directory (e.g. not accessible via yourdomain.com) then they’ll list but no one will be able to actually view them by clicking the link. It might break everything in fact…

    doesn’t work for me, it just keeps adding ../ to the path

    e.g. yoursite.com/wp-content/uploads/../../foldername/

    Nevermind. It does work.

    hennn

    (@hennn)

    hi
    i found a solution for this problem
    edit the line of plugin to below:
    for example of my site:
    $dir = ‘/home/xxx/domains/your-domain.com/public_html’ . ‘/’ . $folder;
    $outputDir = home_url() . ‘/’ . $folder;

    ‘xxx’ and ‘your-domain.com’ related to your ftp directorys
    now you use below link in your post: for example:
    [MMFileList folder=”dl/mp3/” format=”table” /]
    that the ‘dl’ directory is in the root directory.
    be successful.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Way to list directory outside uploads?’ is closed to new replies.