Tutorial 2 - Uploading files to the Blackfynn platform

This tutorial describes how to upload files to the Blackfynn platform using the Blackfynn Agent. It assumes that the user has a Blackfynn account and has setup his/her password. It also assumes the user has configured the agent using the method described in tutorial 1.

Creating a dataset

All files on the Blackfynn platform belong to a dataset. Therefore, we first need to create a dataset before we can upload files to the platform. You create a dataset using the init command.

blackfynn_agent init newDataset 'This is a test dataset for tutorial 2.'

Created dataset newDataset (N:dataset:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

The dataset is now created. To verify, you can open the web application and see the dataset listed in your account. you can also list all datasets using the Agent with the datasets command.

blackfynn_agent datasets

| DATASET                     | NAME                 |
| N:dataset:xxxxxxxx-xxxx-xx  | newDataset           |

Uploading data

Now, let’s upload some files to the dataset we just created. The upload command has multiple options to specify exactly which files should be uploaded. Here, I’ll give a couple of examples but be sure to checkout the documentation for more details.

blackfynn_agent upload ~/Desktop/ --dataset newDataset

will upload all files in the Desktop folder to the newDataset. If you want to limit which files are uploaded, you can add additional Options such as:

blackfynn_agent upload ~/Desktop/ --dataset newDataset --include='*.dcm'

only uploads DICOM images (.dcm files) from the Desktop.