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

    I want to create an own private area for webusers (different for each webuser).
    In this area i would like to be able, as admin, to put files for them.
    and they could also upload files for me.

    I've seen the Upload to User CMP add-on, but it lacks the upload by a webuser.

    thanks for your ideas !

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

    • discuss.answer
      • 43240
      • 10 Posts
      Hi troubadour

      well this might be overkill or not but off the top of my head it could be a potential solution, in my head it could work.

      So if you install the following package http://modx.com/extras/package/filelister

      which will let you do the following :

      "A file-listing snippet for MODx Revolution.

      Salted-hash, secure directory browsing
      Path mapping
      Secure downloading/viewing of files to logged-in users, usergroups
      Fully templatable output
      Various sorting modes
      File extension restricting"



      Then to allow users to upload their own files you could Use Bob Rays file upload snippet http://modx.com/extras/package/fileupload2

      Read more about the snippet here http://bobsguides.com/fileupload-tutorial.html

      Below is a basic snippet to allow users to upload to a particular directory that is unique to them. (you would need to create the usergroup, install the login snippet create the registration pages. Read more here http://rtfm.modx.com/extras/revo/login)


      [[!FileUpload?
          &filefields=`20`
          &uploadgroups=`registeredmembers`
          &path=`uploads/users/[[!+modx.user.id:userinfo=`internalKey`]]`
      ]]


      The issue with the above is that the folder would need to exist before they can upload to it. So if users are registering with the site you would ideally want a folder created for them automatically in the /users/ folder when they register. then the snippet above should upload to their folder automatically. The register Snippet does allow post hooks so you can write a basic snippet to create a folder automatically when they register which can then be used to upload files to by yourself, list on the page and let the users upload to. Read more here http://rtfm.modx.com/extras/revo/login/login.register see posthook

      i dont know if all of the above would work but anyone else jump in.

      [ed. note: nadakbar last edited this post 11 years, 7 months ago.]
        • 30672
        • 180 Posts
        Hi Nadakbar smiley

        thanks for your solution !
        i will test it asap and let you know !

        thank you very much !
          • 30672
          • 180 Posts
          Hi nadakbar!

          si i found time to test your solution and it works perfectly !

          thanks again !
            • 43240
            • 10 Posts
            Quote from: troubadour at May 20, 2015, 06:54 AM
            Hi nadakbar!

            si i found time to test your solution and it works perfectly !

            thanks again !
            i'm glad i could help ^_^ completely forgot i suggested this those months ago. Happy modxing