Bulk Upload - tsgrp/hpi GitHub Wiki
This page is being moved to the alfresco documentation
The Bulk Upload action encompasses the functionality of the deprecated Add Documents action. Bulk Upload allows a user to select multiples files to upload, edit common properties for all documents, edit individual document properties and upload all documents. Additionally, Bulk Upload has support for scanning, generating a cover page (drop-off scanning) and MSG file parsing.
General Configuration
The general Bulk Upload action configuration options are as follows (see below for special functionality configuration):
Inherit Folder Attributes
Enable this configuration option to automatically inherit attribute values from the parent folder (these can be removed individual for each document or modified as a whole from the Bulk Property Editing Page).
Hide File Extensions
Enable this configuration option to hide the file extensions on the objectName
of documents from view in the Bulk Upload action.
NOTE: This does not control whether or not file extensions are added / removed from the objectName
of documents when they are created in the repository. That is handled by a Spring configuration property for the AddDocumentActionExecuter
.
Additional Functionality
The Bulk Upload action also provides additional functionality out-of-the-box. The features currently implemented are as follows:
- Set doc as new version of existing document - must be enabled in the admin
- Scanning - must be enabled in the admin
- Create Document from Template - must be enabled in the admin
- Generating a cover page / drop-off scanning - must be enabled in the admin
- Parsing MSG files for attachments (and recursively parsing attached MSG files)
- Gmail Inbox ingestion - must be enabled in the admin
Extension Whitelist
By default, any file type is allowed and will be uploaded to the repository. However, for some systems that want to prevent some file types from being allowed, the White List Document Types
box allows an administrator to specify which types to allow. Simply comma separate any allowed extensions. All other file types will be rejected by Bulk Upload.
Example whitelist:
pdf,jpeg,jpg,png,gif,doc,docx,docm,msg,potm,potx,ppsm,ppsx,ppt,pptx,pub,xls,xlsx,xlsb,xlsm,xltm,xltx,xltx,xps,html,mp3,mp4,txt,xml,json,eml
Set as new version
Enable this configuration to allow users to set an uploaded doc as a new minor version of an existing document in the folder instead of creating a new document in the folder.
Scanning
The Bulk Upload scanning functionality allows a user to scan multiple documents and upload them.
Configuration Options
License Key: The licence key from Dynamsoft - this must be configured properly for the functionality to work as expected.
Create Document from Template
The Bulk Upload create document from template functionality allows a user to upload a new document by using content that already exists in the repository. See Create Document from Template for more information.
Cover Page / Drop-off Scanning
The Bulk Upload action provides the user the ability to generate a cover page for drop-off scanning functionality.
Configuration Options
Button Name: The text to display on the button used to initiate the generation of a cover page.
Attribute to Generate Barcode With: The attribute to use for generating the barcode on the cover page. A common string property must be used for this configuration option.
Cover Page Title: The title to display at the top of the generated cover page.
Attributes to Display on Cover Page: Enable this option to choose attributes by object type to display in a table on the generated cover page.
Parsing MSG Files
The Bulk Upload action provides support for parsing MSG files - for more information see the Drag and Drop Outlook MSG Files wiki page.
Configuration Options
Email Relation Type: In order for parsed attachments to be properly associated with the parent email repository object, the email relation type must be specified. Choose the appropriate relation type selection depending on whether the repository is Alfreso (hpi:emailed
) or Documentum (hpi_emailed
).
Ingest from Gmail
The Bulk Upload action provides support for pulling in emails/threads and their attachments directly from a user's gmail inbox. This assumes the user's repo email is their gmail account email.
Enabling Gmail API
- Go to https://console.developers.google.com/
- Click the ‘Create Project’ button
- Give it whatever name you want and click the ‘Create’ button
- Once it has been created, you should be taken to the Project Overview page. In the lefthand column, click on Credentials, and then click the 'OAuth consent screen' tab
- Fill out Product name. This will be shown to the user when they authenticate when importing docs from their gmail. You can fill out the other sections if you want, but it is not necessary.
- Save your changes
- Go to the Library by clicking the menu item on the left.
- Under Google Apps APIs, click on Gmail API
- Click the 'Enable' button at the top
- Once the API has been enabled, an option will appear to create a new Client ID.
- When creating the client ID:
- Make sure Web application is selected
- In the Authorized JavaScript origins section, put in the url for that is hosting HPI. For example, if HPI was accessed by http://www.mysite.com/hpi, you would use http://www.mysite.com. Note that multiple domains can be entered here if you have multiple HPIs that you would like to access the Gmail API.
- Click Create Client ID
- Copy the Client ID
- In the bulk upload config, paste the Client ID from 14 into the 'Gmail Client Id' textbox
Note that you can always get back to your Client ID by going to the Credentials section.
Configuration Options
Gmail Client Id: The client id from registering the application with Google. See above for instructions
Enabling Upload From Box
Box Application
- Create an application in Box or use an existing one
- Go to https://app.box.com/developers/console to view existing apps or create a new one https://github.com/tsgrp/HPI/blob/master/wiki-images/BulkUpload-Box-Apps.png
- When asked what type of app you are building, choose
Partner Integration
- Within an application, under the configuration tab, we can see the Client ID that we will need to use in the bulk upload admin (picture below)
- Below the client ID will also be the redirect URI that will need to redirect back to HPI
(ex. https://localhost:8080/hpi/dummy/path) https://github.com/tsgrp/HPI/blob/master/wiki-images/BulkUpload-Box-ClientID.PNG
Bulk Upload Config
- Select Bulk Upload Action
- Set 'Enable Cloud Integration' slider to Yes
- Choose 'Box' from dropdown selecting which application to integrate with (Box is the only one at the moment)
- Set Client ID (Explained above)
- Set Link Type to 'direct'
- Choose whether to allow a user to select multiple documents to upload https://github.com/tsgrp/HPI/blob/master/wiki-images/BulkUpload-Box-Config.PNG
Bulk Upload View
- When configured, Box upload will be a button next to the other upload buttons https://github.com/tsgrp/HPI/blob/master/wiki-images/BulkUpload-Box-Upload.PNG