Connecting an Azure Blob Container to a Project

Projects can be configured to store and serve files from an Azure Blob Storage container. This allows your organisation's data to remain in your own Azure subscription.

Prerequisites

You will need the Configure File Settings permission on the project. See Permissions for details.

Before configuring the project, you will need the following from Azure:

  • An Azure Storage account (general-purpose v2)
  • A blob container already created within that storage account
  • One of the storage account's access keys (Storage account > Security + networking > Access keys)

Steps

  1. Navigate to your project and open the Settings tab.
  2. Scroll down to the File Storage Setup section.
  3. Set File Storage Source to Azure Blob.
  4. Fill in the fields:
    FieldDescription
    Storage AccountThe name of your storage account (e.g. mycompanydata)
    Blob ContainerThe container within the account to store files in (e.g. project-data)
    Key PrefixOptional path prefix for all files in this project (e.g. project-a/). This allows multiple projects to share a single container by scoping each to a different prefix. Leave empty to use the container root.
    Account KeyAn access key for the storage account
    Endpoint SuffixOptional. Leave empty for the global Azure cloud (core.windows.net). Set this only for sovereign clouds (e.g. core.usgovcloudapi.net, core.chinacloudapi.cn).
    Direct Storage AccessOptional. When enabled, file reads are served directly from Azure instead of streaming through the server (see Direct Storage Access below). Off by default.
  5. Click Save.

The project will now use the configured Azure container for file storage and access.

Direct Storage Access

By default the server proxies every file read: it fetches the bytes from Azure and relays them to the client. With Direct Storage Access enabled, the server instead hands the client a short-lived SAS URL and the client fetches the bytes straight from Azure — reducing server bandwidth and latency, and letting the SDK stream large models without per-request round-trips to the server.

The trade-off is that the server authorises access when it issues the SAS URL rather than on every byte range, so a SAS URL remains usable until it expires (a few minutes). Leave this off if you require the server to authorise every individual read. Browser downloads with this enabled rely on the CORS configuration below.

CORS Configuration

When uploading files, the browser uploads directly to Azure using short-lived SAS URLs. For this to work, your storage account must have a CORS (Cross-Origin Resource Sharing) rule that allows requests from the domain where udServer is hosted.

In the Azure Portal, navigate to your storage account > Settings > Resource sharing (CORS) > Blob service, and add a rule:

SettingValue
Allowed originshttps://your-udserver-domain.com
Allowed methodsGET, PUT, HEAD, DELETE
Allowed headers*
Exposed headers*
Max age3600

Replace https://your-udserver-domain.com with the origin your udServer instance is served from. This is typically https://udcloud.nuclideon.com or https://au-udcloud.nuclideon.com. You can list multiple origins if needed.

SettingWhy it's needed
Allowed methodsPUT is required for direct block uploads. GET and HEAD for file downloads and metadata.
Max ageCaches the preflight response so the browser doesn't send an OPTIONS request before every chunk.

Without this configuration, file uploads from the browser will fail with CORS errors.