• Resolved fabrizio.pezone

    (@fabriziopezone)


    I have a fileaway object with this code
    [fileaway base=”1″ directories=”on” sub=”fa-username” type=”table” paginate=”true” bulkdownload=”on” manager=”on” exclude=”_thumb”]
    When i select the add button (plus) the object create a new directory but in the wrong path.
    For example I have the user “user.test” the object create the directory “usertest” and put the new folder inside this new directory. Instead if I put the name of the folder before the name of the file in the fileup object all is going well

    Thanks

    https://ww.wp.xz.cn/plugins/file-away/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author thomstark

    (@thomstark)

    Sorry, I really don’t know what you’re trying to tell me. It sounds like perhaps you have a misunderstanding of how it’s supposed to work, but I can’t be sure, because I’m not following very well.

    Thread Starter fabrizio.pezone

    (@fabriziopezone)

    If I’m logged in the site with login = “user.test” and I upload (with fileup) a file named test.gif writing 2014/test.gif in the input text for the path, at the end I find in the user.test directory a new folder named 2014. It works well because when I read the user.test directory with the fileaway object I find also this new folder.
    Instead if I use the plus button in the fileaway object and write 2014 in the input text for the name at the end I don’t find this new folder inside the directory “user.test” because the object create a new directory named “usertest” and put the folder 2014 inside this directory. So I can’t see this folder in the fileaway object under “user.test”.
    I hope to be more clear.

    Plugin Author thomstark

    (@thomstark)

    Gotchya.

    Open up wp-content/plugins/file-away/lib/cls/class.fileaway_management.php

    Go down to lines 321 to 322:

    Change this:

    $parents = stripslashes(trim(str_replace('.', '', $_POST['parents']), '/'));
    $newsub = stripslashes(trim(str_replace('.', '', $_POST['newsub']), '/'));

    to this:

    $parents = stripslashes(trim(str_replace('..', '', $_POST['parents']), '/'));
    $newsub = stripslashes(trim(str_replace('..', '', $_POST['newsub']), '/'));
    Thread Starter fabrizio.pezone

    (@fabriziopezone)

    It’s ok. Thank you

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Add button fileaway object’ is closed to new replies.