Batch Attachment Uploader
Bulk attachment upload allows you to upload attachments (files) to existing records, by matching the filename against an identifier of the record.
What does Batch Attachment Uploader do?
- Validation, upload, and rolling back of the attachments
- Disambiguation of records if a file name was matched to multiple records
- Ability to stop upload/rollback at any point
- Upload and Rollback are majorly tolerant of network issues and crashes on the client’s side
- Attaching remarks to the metadata of the data set.
- If a numeric field (e.g. Cat #) is used for matching records,
000000001.jpg
is treated the same as1.jpg
, and0001.jpg
. However, if a text field is used, all the previous ones would be treated differently.
User Roles and Permissions
If a user is not an admin in order for them to be able to use Batch Attachment Uploader an admin will need to add the “Bulk Attachment Import” role to the user in the “Security and Accounts section”. This role will give the user full access to batch attachment uploader but can be edited as needed.
If you need more information on Security & Accounts and user roles, see this guide.
Data sets, and selecting files, and validating files
-
Go to the Attachments gallery by clicking on the side menu icon. Click on Import in the top-right corner.
-
The dialog showing existing attachment data sets is visible. Click on New to make a new data set.
-
There are two ways to select files
- Clicking Choose files or drag them here
- Drag files onto the blank space in the center.
-
Duplicate files are not allowed. Hence, if you select the same file again, it opens a dialog saying “ Duplicate Files Found” and will show which ones are duplicates
-
By default, no field is selected to match the files to records. Choose the desired path in the picklist to match the files against.
- There are several different paths to choose from including
Collection Object/Cat #
Collection Object/Prev/Exch #
Taxon/Full Name
Collecting Event/GUID
Collecting Event/Field #
Loan/Loan #
Accession/Accession #
Gift/Gift #
Borrow/Invoice #
- There are several different paths to choose from including
-
In this example, I am using “Collection Object / Catalog Number” - note that this label may vary across databases. So, the first item in the picklist will always use “Collection Object / Catalog Number”.
-
After selecting the path, the files which are correctly and incorrectly formatted are marked. In my case,
000000001.txt
is marked as correctly formatted andNot correctly Formatted.txt
is marked as incorrectly formatted since the catalog number is numeric field. -
Additionally,
20.txt
is also marked correctly formatted (since it doesn’t care about leading zeros).
-
Click on Validate to test match the files against records in the database. If correctly matched, it shows a formatted version of the record with a link to open the record in a new tab.
- If no match is present, it shows the text
No match
. - If there are multiple matches (not possible in this case, but possible for taxon), it says
Multiple Matches. Click to Disambiguate
. - If the record is incorrectly formatted, it preserves the text - it should still say ‘Incorrectly Formatted’
- If no match is present, it shows the text
-
Clicking on validation again will re-run the validation query.
Uploading files
-
If an upload is possible, the Upload becomes visible (for example, if any filename is correctly formatted and has not been uploaded before, the button should be visible). Click on Upload to start the upload.
-
Now while the upload is in progress, a progress bar should be visible with an option to stop the upload.
-
You can click on stop to stop the upload. Note that some files (at least 1) will always be uploaded (unless you click really fast). The table should say which files were uploaded, and which were not.
-
For any remaining files after clicking on stop, it says
Cancelled: Stopped By User
.
- If you refresh or open the link in a new tab all the files in the selected file will have a warning and you need to reselect the files before uploading. It tries matching the new files you selected to the previously selected files (based on filename, size and type). If it cannot find the file in previously selected files, it adds a new row for that file. If it finds a match for that file, that previous file will have
(No File)
removed.
- Click Upload again. All the files that were previously uploaded will not be uploaded again, and instead will say
Skipped: Already Uploaded
for that file. The rest of the files will be uploaded. - For files which were not correctly matched, it says
Skipped: No Match
orSkipped: Multiple Matches
. The ones incorrectly formatted, it saysSkipped: Incorrectly Formatted
.
Interruptions
-
While the upload is in progress if there is an interruption like your internet going out after some time, it opens a dialog with a timer displaying the time after which it will retry.
- You can either click Try Now, Cancel, or wait for the timer to finish for the upload to continue.
- You can either click Try Now, Cancel, or wait for the timer to finish for the upload to continue.
-
If the upload is still in progress and the tab gets closed when you reopen it prompts you with a dialog saying that the upload was in progress when it was interrupted.
- Close this dialog, and it tells you which file(s) are definitely uploaded, and the file(s) which were not.
- You can then reselect all the files (including already uploaded ones - it would just skip them).
Rolling back files
- If a rollback is possible, the Rollback becomes visible. This happens if at least one file was uploaded.
- Clicking on Rollback will delete the files from the asset server, and the corresponding records from the database.
- Similar to upload if you stop the rollback it will show which files got deleted and which did not
- For the files which were not uploaded, after the rollback it says
Skipped: No Attachments Found
. - Similar to upload, you can stop the rollback at any point.