The purpose of uploader-plus is to enhance the standard Alfresco uploader with a dialog that prompts the user to choose a content type and to enter the metadata.
An interesting feature of the plugin is that different folders can be configured to allow different content types. Configuring which content types are allowed in which folders is the administrator’s main task, as we’ll see in this post.
Configuring an upload folder
To access the configuration of uploader-plus you must:
- log in to Alfresco as an administrator,
- click on Admin Tools from the header menu,
- click on “Uploader Plus” from Tools menu on the left.
Configuration is usually done one-off and needs not be changed unless the requirements change.
The first time you use the plugin, there are no configured upload folders. This situation does not mean that uploads are not allowed on the system. It only means that the standard Alfresco uploader is active and none of the plugin’s features are in use.
To start, click on the “New upload folder” button. A dialog will pop up, prompting you to choose the folder that you’d like to configure. Any folder in the repository can be chosen, and shortcuts to the sites are offered for convenience.
Once you’ve chosen a folder, a second dialog is displayed offering all the content types in the system and prompting to choose those allowed for the folder.
The list of content types is long but can be grouped in three categories:
- the generic type cm:content
- custom types from custom models that you have deployed to Alfresco
- system types (like bpm:activityOutcometask, dl:contact, etc) that Alfresco uses internally.
The system types generally make no sense to normal users and can be ignored. Custom types may or may not be present on your installation so we won’t consider them here. Your safest approach is to select cm:content and to click on Save. The admin panel will be updated with the new upload folder you’ve just defined.
Repeat the procedure to define as many upload folders as you need. By hovering on an item, the links to “Edit” and “Delete” will appear: these allow you to modify your list of upload folders.
Testing an upload folder
From the admin panel, click on the path of an upload folder to view it in the repository browser. Alternatively navigate to the upload folder from a site’s document library.
Now you’re ready to upload your first document. Click on “Upload” – the usual upload dialog will appear.
Select a file to upload as you normally would. The metadata dialog will appear automatically.
In the upper part there is a “content type” selection. Here it only offers “cm:content” because this was the only content type we configured, but in other scenarios there can be more options. Based on the type selected, the lower part of the dialog presents a metadata form for the type. In this case cm:content brings a form with three properties: name, title and description.
Enter the values for the form and click on Ok. If multiple documents are uploaded, you’ll be prompted for metadata for each individual document.
“Upload folders” vs. regular folders
The upload folders you configure in the admin panel will use the enhanced uploader, prompting for type and metadata. Any other folders are considered regular folders and the standard uploader will be used for them (with no prompting for type or metadata).
In another post I focus on the use of uploader-plus with custom types, tapping into the capabilities of Alfresco’s forms engine.