Greetings,
My goal is to have users log in, and on the dashboard have a button that allows them to upload to a root folder, but I'm not sure how to accomplish this within the widget. I know how to create a widget, but its more about setting up the code in the back end. I'm not sure how to create the button, and how to tell it [[+base_url]]/assets/img/images/user-uploads/
This was my goal I achieved
https://i.imgur.com/DZzLTRo.jpg
I'm going to write this out for whoever may find this in the future and need more instruction
To add a widget:
-Log in to modx manager
-Click the gear icon in the top right->Dashboards
-Create Widget
-Assign FileUpload or Quickstart Buttons
To get Quickstart Buttons, go to the link below and follow those instructions. Don't forget to install!
https://www.modmore.com/extras/quickstartbuttons/download/
FileUpload can be installed from your Extras->Installer->Download Extras
I became stuck at one point, so I checked the error log to see what the exact issue was. To view your error log, go to
- Manage->Reports->Error Log
Be sure to scroll all the way down to see the most recent error.
Quickstart Buttons had an error where if a user was not given a role, it would give a 500 error. If you receive the same error, make sure your users all have roles assigned to them.
Edit your quickstart settings by going to Extras->Quickstart Buttons
-Add new set
-Enter information
-assign user groups
-assign image to your new button if you like
-add new button
-underneath link, make sure 'Systems Action:' is media/browser
-make sure namespace is core
If everything went ok, you'll have a new button on your dashboard. It opens to the root file, which is not ideal for users to upload to. We need to change this.
In the menu at the top, click the media button, then click 'Media Sources'
-create new Media Source
-make sure source type is File System
-update basePath and baseUrl to the folder you want it to upload to (create the folder first or this may cause an error)
-baseUrl and basePath should look something like 'assets/img/images/uploads/
Check to make sure your button is still working. If so, we are moving on the last step which is where we make our new Media Source the default for our browser. There's probably a better way to assign Quickstart Buttons default media source, but this is a quick and dirty way to accomplish the task.
In the menu in the top, go to the gear icon and select->System Settings
-In the search bar, look up 'default_media_source'
-Right click Default Media Source
-At the bottom, change the value to your desired media source
Go test your button on the dashboard. Users should now only see your designated upload folder.
Major thanks to Mark Hamstra of Quickstart Buttons, Bob Ray of FileUpload, and LK for the direction when I was lost.
[ed. note: brittislove last edited this post 8 years, 5 months ago.]