We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46309
    • 79 Posts
    Hi,

    I'm using Upload to Users CMP Extra (http://modx.com/extras/package/uploadtouserscmp) together with MODx 2.4.3. and subdomain installation. I've installed also Login, FileUpload, FileDownload R created a User Group Members with role Member and Load, List and View.

    The idea is when a user is logged in and became a part of the Members User Group to be able to upload and download files within his account. The process of assigning the user to the Members group is manual.

    Everything works except that when I go to Extras -> Upload to User, there is a list with created users but no folders or files inside. When you click on a user there is a Folder path: undefined and If I try to upload manually a file the following message appears: "Please specify a valid directory." And if I check within the Filesystem or ftp there is such folder and files. Also on the front end the files can be uploaded and seen.

    My code:
    Upload File Resource
    [[!FileUpload?
        &filefields=`1`
        &uploadgroups=`Members`
        &createpath=`Yes`
        &path=`userfiles/[[+modx.user.username]]/`
        &maxsize=`1100000`
        &cssfile=`fileupload.css`
        &allowoverwrite=`0`
        &dirpermission=`755`
        &extensions=`txt,html,htm,xml,zip,gz,rar,z,tgz,tar,pdf,doc,docx,xls,xlsx,ppt,pptx,jpg,jpeg,png,tiff,svg,svgz,gif,psd,ico,bmp,odt,ods,odp,odb,odg,odf`
    ]]
    
    <br />
    <p>List with uploaded files: </p>
    <br />
    [[!FileDownload?
    &getDir=`userfiles/[[+modx.user.username]]/`
    &browseDirectories=`1`
    &countDownloads=`0`
    &tplFile=`@CODE:    <tr[[+fd.class]]>
            <td>
                <a href="[[+fd.url]]">[[+fd.filename]]</a>
            </td>
            <td>[[+fd.sizeText]]</td>
            <td>[[+fd.date]]</td>
        </tr>`
    ]]


    The files can be seen and downloaded on the site when a user with privileges is logged in.
    The error log says:
    (ERROR @ /assets/components/uploadtousers/connector.php) userfiles/ for Upload to Users package does not exist.


    Any suggestions how to fix it?

    This question has been answered by deyand. See the first response.

      peace&love / bike&ride
    • discuss.answer
      • 46309
      • 79 Posts
      OK I found a solution.
      The problem was in Upload to User settings - there have to be typed the root path of the users folders into the System Settings -> uploadtousers

      Something like this:
      /home/mydomain/public_html/mysubdomain/userfiles/

      I have typed only /userfiles/ for path and this is where the problem came from.

      And that's it. Now it works smiley [ed. note: deyand last edited this post 8 years, 1 month ago.]
        peace&love / bike&ride