We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18809
    • 109 Posts
    I have got a project in which client want a download system where user able to login and download its own file.
    I want user to redirect to download page after login where user can download admin-pre-uploaded file.
    Is there any Extra to do this ? I cant find.
    Help me!
      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      "FileDownload R" could be useful, but you'll need a way to define what file belongs to what user. Depending on your requirements, perhaps with a TV or some specific file structure, or...
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 18809
        • 109 Posts
        Hi.. Thanks for the reply..
        I want to show a pdf file for download when a user login.
        Like user 1 login and redirects to his download or dashboard page where a sime download link for a file.pdf is waiting for him to be clicked.
        Same with other users like user2 3 and so on.. Different file.
        My client want to give his users ability to download pdf of their marriage album.
        So he want like when customers login, it goes to a page where they can download their album.. Nothing more than that.
        How to set custom download url for each user when he login?
          My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
          • 3749
          • 24,544 Posts
          If you name the album for the user: username.pdf and put it in the assets/albums/ directory, this might work:

          <a href="[[++assets_url]]albums/[[+modx.user.id:userinfo=`username`]]">Download your album</a>


          You can redirect users to the page with the code above using the &loginResourceId property in the Login tag.

          The downside is that others could download someone else's album if they could guess the URL.

          You could make it more secure by adding a hash based on some user data like email, fullname, id, etc. to the file name and using a custom snippet to produce the link, but you'd have to calculate the hash for each user and use it to rename the album. It might be possible to do this automatically when you upload the album.







            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 18809
            • 109 Posts
            Quote from: BobRay at Dec 23, 2017, 04:41 PM
            If you name the album for the user: username.pdf and put it in the assets/albums/ directory, this might work:

            <a href="[[++assets_url]]albums/[[+modx.user.id:userinfo=`username`]]">Download your album</a>


            You can redirect users to the page with the code above using the &loginResourceId property in the Login tag.

            The downside is that others could download someone else's album if they could guess the URL.

            You could make it more secure by adding a hash based on some user data like email, fullname, id, etc. to the file name and using a custom snippet to produce the link, but you'd have to calculate the hash for each user and use it to rename the album. It might be possible to do this automatically when you upload the album.








            Can you help me more on this??
            I want a user dashboard where they can see file links and in admin, i want to view when userwas created or registered..
            I know this can be done in Modx.. But i am in swarm.
              My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
              • 18809
              • 109 Posts
              Hello bob sir, is this possible to each gallery for specific client(user) ?
              Client want separate galley for each client now. So can you suggest me with Extra to use to get it working ?
              Each client login and redirect to their private page where they they can see gallery online instead of download pdf (which was their previous requirement).

              Which plugin to use ? Migx or else? How to redirect user to go to their private page where they can see gallery?

              Thanks
                My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                • 17301
                • 932 Posts
                I'd suggest maybe looking into 'upload to users' package
                  ■ email: [email protected] | ■ website: https://alienbuild.uk

                  The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                  • 18809
                  • 109 Posts
                  Quote from: lkfranklin at Jan 04, 2018, 09:57 AM
                  I'd suggest maybe looking into 'upload to users' package
                  Thanks. Going to Check this out. smiley
                    My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                    • 18809
                    • 109 Posts
                    Quote from: Mayanktaker at Jan 04, 2018, 10:10 AM
                    Quote from: lkfranklin at Jan 04, 2018, 09:57 AM
                    I'd suggest maybe looking into 'upload to users' package
                    Thanks. Going to Check this out. smiley
                    Hello my requirements changed. Please check my 2nd last post.
                    Thanks. smiley
                      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                      • 3749
                      • 24,544 Posts
                      There are many ways to do this. One way is to create a User Setting on the Settings tab when editing the user.

                      Use login_page_id as the key of the setting and the ID of the user's page as the value. Then put this in the Login tag (The Name of the setting doesn't matter, but 'Login Page ID' would make sense):

                          &loginResourceId=`[[++login_page_id]]`



                      If you will have many users, you could automate this by creating a plugin that runs when the user registers or is activated. The plugin could create the user's page and also create and set the User Setting, though that would be more complicated.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting