This page is for testing file uploads configuration. I tested below recommendations except where noted and provided notes about my test below.
- using the menu tool for Assets
- drag and drop all images from department folders into appropriate images folders under the testup tree. Wygwam and Assets fields should automatically adjust the URLs for linked images
- drag and drop all department folders to the Documents tree. Wygwam and Assets fields should automatically adjust the URLs for linked documents
- To avoid broken links in fields with hard-coded links (Quick Links, buttons, visual navs) as well as search results and external links, add a detour like "%images/uploads/a-team%%" to "documents/a-team" for each moved folder
- using the EE Channel Fields tool, convert the field type of the QuickLinks Document Upload field to Assets. (still needs testing)
- this will allow members to use the same tool they are accustomed to using in other fields
- will also need to update templates using this field to use assets field instead (there are differences in the way the fields are called). See How to Switch to Amazon S3 for File Storage on an ExpressionEngine Site
- using the EE File Uploads Preferences tool
- remove access to uploads location (which should now contain only image folders) for all member groups except ITS and Marketing
- set up a File Uploads location for each department folder and grant specific member groups access to that location
- simultaneously remove those groups' access to the top-level Documents location so they can see only documents in their own folder
- using this audit template, establish an audit plan in Marketing whereby we regularly check the folders under Documents for unauthorized image uploads and reach out to non-compliant member groups.
Questions to Answer
- What happens when a member adds a manual link to a file resource from another area of the website outside their access, then tries to edit it later or using browse server? Will it cause any problems updating? Can they then access the resource via Assets?
- Does it really break all the existing WYGWAM links when moving folder from uploads to Documents folder? If so, is there anything that can be done to prevent it (maybe syncing both folders before the move)?
For the test, I moved the a-team folder into the Documents tree from the testup tree (drag and drop in Assets menu tool), then used the Assets menu tool to upload the hero image above as well as the Mime Types Word Document and a random PDF file.
I set up the a-team folder in EE File Upload Prefs, then attempted to add the quick links at left using the QuickLinks Document upload utility, but it doesn't help because that field is set to File type and the only file location options are "All" or specific folders. (I have since removed the File Upload Pref for this folder because it appeared in the main list in Assets. Currently all member groups have access to the top-level Documents and testup folders, so this redundant listing would have been confusing, but I think we could grant each member group access to only their subfolder and eliminate any confusion. This would also remove their access to other member groups documents and force them to upload docs only into their own folder where they can manage them properly.)
Options for Quick Links Files
- possibly change the field to Assets, see this screenshot for how I suggest to set that up. It still would need to be set to All folders, but the same controls you're using to disable/enable view of folders in assets will probably still work here.
- possibly set up file upload prefs for each member group/folder individually. Then we can show all in the field, but only those folders the group should be able to upload to would show up in the list (I think)
I tested all the links on this page to make sure they worked, then moved the entire folder back under the testup tree to test that they continue to work. (Assets automatically reroutes all the links so they continue to work when the file is moved or renamed. Note: this fixes in-system links that aren't hard-coded, but search results and direct links from elsewhere will be broken unless we also add a detour like "%images/uploads/a-team%%" to "documents/a-team". At least, I think that is the correct syntax.
- members used for test: Janice as Super Admin; Kristen Stanford as temporary employees, Michael Leverett as Marketing
- Moved a-team to Documents tree. (a few files already in the folder from previous test: list_of_mime_types.docx, minutes-2016_03_02-UCC.pdf, quicklinks-file-as-assets.png, error-delete-after-attempted-overwrite.png)
- Viewed page with links. Assets field (image) came over fine, but there were problems with all WYGWAM links. They converted as https://www.armstrong.edu/images/uploads/a-team/minutes-2016_03_02-UCC.pdfminutes-2016_03_02-UCC.pdf} which threw a "invalid URI" error due to the "}" on the end. Would also be an invalid URL. Should have converted to https://www.armstrong.edu/documents/a-team/minutes-2016_03_02-UCC.pdf (see Step 6 in the Amazon S3 article for how to deal with this).
- Created File Uploads location for Above and Beyond (a-team) and gave just the member group "temporary employees" access.
- Super Admins can always see file locations, so it showed up for my user in Assets, but Marketing users (Michael) cannot see it.
- Removed "temporary employees" access from both top-level folder locations, "Documents" and "uploads". Kristen can not see these folders in Assets.
- As Kristen, uploaded a document into the Above And Beyond location for the a-team folder. Document was Annual_Security_Report_2012.pdf
- As Janice, attempted to view the file through the Documents/a-team location, but it didn't show up. Reindexed the folder and then it appeared in the list.
- Edited links on this page.... unsure exactly what I did at this step, so will need to repeat the whole test and make better notes, as the results below were confusing.
- Moved folder back to Uploads.
- tested links in this page. found that the mimes docx was linked to uploads location, but the minutes pdf was still linked to the documents location. The quick link to security report (new file) was also still pointed at documents location. However, the WYGWAM link to documents continues to work, while the Quick Link (which was a hard-coded URL) does not.