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

    I wanted to have suggestions about the best way to make an image upload system.
    I’m on MODx Revolution 2.0.6-pl.

    The system would require the user to login (name, password) before being able to upload files.

    First, I’m not sure whether I should let them access the manager for this or not.

    I guess it’s either:
    - Make users Manager users
    - Being able to reuse the login form + file upload system of the manager
    - Only let them upload files, nothing else (maybe using a plugin like ManagerManager to remove stuff)

    or:
    - Make users Web users
    - Create a page with a form to let them log in (maybe using a form snippet, like FormIt or SPForm? Or is it even worth it just for 2 fields?)
    - Redirect them to a new page that lets them upload files (couldn’t find a file upload plugin that works with Revolution)

    PS: it doesn’t matter much if they can upload files other than images, I trust the users, and there will be very few of them.

    Any advices?
    Thanks!
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      I’d go with #2, unless the users already use the manager. Might aswell make a CMP for it then.

      FormIt could come in handy for some validation but I think it may be easier to just custom code your processor (snippet?).
        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.
        • 28589
        • 56 Posts
        Thanks, I’ll do that then.

        After having looked around a bit for existing stuff, I think I’ll use Uploadify, following sottwell’s guidance:
        http://modxcms.com/forums/index.php?topic=48083.0
          • 15083
          • 697 Posts
          Don’t ever trust your users smiley
          They will be uploading 100mb autocad documents before you know it ;0
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            They might accidentally upload a virus, without ever knowing that did.

            And come to you telling you that the site broke cause of what you’ve done.
              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.
              • 28589
              • 56 Posts
              For the record, I’m done and have got a nice little system up and running.
              If anyone stumbles on this later and may find this useful: I’ve been using the Login plugin (http://modxcms.com/extras/package/551), which was just what I was looking for to handle member login. Then Uploadify, as I mentioned above, and finally jqGrid (jQuery grid plugin) to display the uploaded files (using a JSON source). The less work I do myself, the better. smiley
                • 9102 ☆ A M B ☆
                • 318 Posts
                For the record, I set up an image upload system by going the other way (1), and it works well for me. I wanted my users to be able to use the manager anyway, I just severely limited what they are able to see and do, which is pretty easy if you play around with their user group settings. They just use the normal file upload system to upload images.

                I set up a plugin to resize the images using PHPthumb, basically a variation of PHPthumbOf, but done as a plugin. There were a couple of tricky bits but it went pretty smoothly once I figured out what I was doing.

                Just wanted to point out that either approach can work, depending on your needs.