Adding Or Removing Resource Files


In addition to image session scan files, the XNAT file system can support the storage of many other types of resource files.

These files can be accessed by the XNAT API for upload, download or scripting purposes, but they are not searchable via the XNAT search tools.

Adding Resource Files Manually

Snapshot of the Manage Files console at the project level, after running the XNAT Populate script.

XNAT offers a Manage Files console at each level of the XNAT data structure. Users can add files of any type to a project, subject, experiment, image session, or assessor. This console can also be used to view, download, or remove files that have already been uploaded. 

Uploading Files

Uploading files via the Manage Files console is fairly straightforward, but it does require several clicks and decisions. Users must select a root folder ("Level") and subfolder ("Folder") to place their file in. Additionally, they can rename the file and specify its file format, add tags (these are only used for reference, and not used by the XNAT search engine), and specify whether to overwrite an existing file of the same name.

Downloading Files

There are two methods you can use to download files from the Manage Files console. Each file name in the console is a link that triggers a download action in your browser, so simply clicking on a file name will start a download.

Alternately, if you want to initiate a bulk download of multiple files or folders full of files, follow the following steps:

1. Check the checkboxes next to the files or folders that you want to download. (Note that the checkbox for a folder whose contents have been partially selected will appear in the intermediate state, i.e. "[-]").

2. Select your download packaging method. Users can download the package of files as a .zip, .tar or .tar.gz archive. 

3. Click "Download."

Updating File Metadata

This is a rarely-used feature that can be helpful in cleaning up the catalog entries of a set of resources that has been modified often. Click the "Update File Data" button and confirm the action in the resulting confirmation dialog.

Deleting Files or Folders

Each file or closed folder listed in the Manage Files console has a delete icon listed to the right of its label. (This looks like a pair of red-handled scissors.) Click this icon and confirm the action in the resulting confirmation dialog, and the resource file or files will be deleted.

Setting Up A Custom Resource Uploader


$label.name