---
title: "How do I upload and manage files in Drive?"
slug: "how-do-i-upload-and-manage-files-in-drive"
updated: 2025-08-18T06:26:04Z
published: 2025-08-18T06:26:04Z
canonical: "support.lusid.com/how-do-i-upload-and-manage-files-in-drive"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I upload and manage files in Drive?

Providing you are a LUSID user with sufficient privileges, you can upload files to Drive and perform standard file management operations on those files.

> **Note:** If you are the LUSID domain owner, you are automatically assigned the built-in lusid-administrator role, which has all the permissions necessary to perform the operations in this article. To see how to grant other users permission to use Drive, follow [this tutorial](/v1/docs/setting-up-access-control-for-different-drive-users).

Note the following:

- Files uploaded to Drive, and folders you create to organise files within Drive, must have names between 1 and 256 characters long, consisting of alphanumeric, dash (-) or underscore (_) characters only.
- Files cannot be empty, nor larger than 2GB.

You can interact with Drive using the LUSID web app, or programmatically using the Drive API.

## Using the LUSID web app

To upload a file:

1. Sign in to the [LUSID web app](https://www.lusid.com/app) using the credentials of a LUSID administrator.
2. From the left-hand menu, select **Data Management > Drive**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/0e17e913-5c78-4366-bd7c-3401a958ed0e.png)
3. On the **Drive** dashboard, click the **Upload file** button (top right), and follow the instructions: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/71054091-b172-4f2e-8f16-470d27af59a9.png)

You can perform standard file management operations from the **Drive** dashboard. For example, you can:

- Create folders using the **Create folder** button (top right).
- **Download** a file (not a folder) by clicking the ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/db646a78-1a28-4872-8a28-2dc88b25fc13.png) **Actions** icon for a file row to open its shortcut menu.
- **Rename** a file or folder. Note names are classed as metadata on the underlying object.
- **Copy link** to share a file or folder by copying a URL to the Clipboard. Note recipients must be [users](/v1/docs/what-are-a-personal-user-and-a-service-user) in your LUSID domain with [suitable permissions](/v1/docs/setting-up-access-control-for-different-drive-users) to use Drive.
- **Move** a file (not a folder). Note you can *bulk move* by selecting file rows and choosing **Move** from the **Choose action** dropdown (above the rows): ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/d651e7a1-b4ca-4533-808c-15927227db19.png)

## Using the Drive API

To upload a file:

1. [Obtain an API access token](/v1/docs/how-do-i-obtain-and-use-a-short-lived-api-access-token-from-okta).
2. Call the [CreateFile](https://www.lusid.com/docs/api/drive/endpoints/files/CreateFile) API, passing in your API access token and the following parameters (see comments for details):

```powershell
curl -X POST "https://<your-domain>.lusid.com/drive/api/files"
   -H "Authorization: Bearer <your-access-token>"
   -H "Content-Type: application/octet-stream"
   -H "x-lusid-drive-filename: trade-file.csv"                  # This is the name of the file as you want it to appear in Drive
   -H "x-lusid-drive-path: /Instruments"                        # This is the intended folder location in Drive; "/" signifies the root folder
   -H "Content-Length: 2220"                                    # This is the file size in bytes; it must be accurate
   --data-binary @my-trade-file.csv                             # This is the path to the local file you want to upload
```

The response contains an automatically-generated id that uniquely identifies the file in Drive:

```json
{
   "id": "aab46045-df2f-4446-a6e3-6af269d9c26f",
   "path": "/Instruments",
   "name": "trade-file.csv",
   "createdBy": "00u91lo2d7X46sdse2p7",
   "createdOn": "2021-07-16T14:27:41.5827803+00:00",
   "updatedBy": "00u91lo2d7X46sdse2p7",
   "updatedOn": "2021-07-16T14:27:41.5827803+00:00",
   "type": "File",
   "size": 2220,
   "status": "Active",
   ...
}
```

Note you can search for a particular file or folder using the [Search](https://www.lusid.com/docs/api/drive/endpoints/search/) API. If no path is specified, the root folder is searched recursively. All the metadata required to interact with object(s) is returned in the response.

Note also that the following Drive API endpoints support [result filtering](/v1/docs/filtering-information-retrieved-from-lusid):

- [GetRootFolder](https://www.lusid.com/docs/api/drive/endpoints/folders/GetRootFolder) - List the contents of the root folder
- [GetFolderContents](https://www.lusid.com/docs/api/drive/endpoints/folders/GetFolderContents) - List the contents of a particular folder
- [Search](https://www.lusid.com/docs/api/drive/endpoints/search/)- Search for a particular file or folder

## Automatic virus scanning

Every file uploaded to Drive, or whose content is modified whilst stored in Drive, is automatically scanned for malware. Note the following scan stages:

| **Stage** | **Implication** | **File state or error code** |
| --- | --- | --- |
| Virus scan in progress | You cannot download a file while a scan is in progress. | 716 VirusScanInProgress (HTTP 423) |
| Malware detected | You can see the file in the list of files and delete it as normal but you cannot download a file containing malware. The response body of the API call contains the reason. | 715 MalwareDetected (HTTP 410) |
| Virus scan passed | The file is clean and ready to use. | Available |
| Virus scan failed | The scan could not be performed. | Failed |
