---
title: "Upload files"
description: "Store any file in a drive, and know what happens to it after the upload."
canonical_url: "https://docs.flashdrive.space/platform/uploads-and-indexing"
---
# Upload files

> Store any file in a drive, and know what happens to it after the upload.

A drive stores files of any type. Each file can be up to 10,000,000,000 bytes (10 decimal GB), as long as it fits your workspace's available storage.

## Upload from the Console

Open a drive, open the destination folder, and select **Upload files**, or drag files or a whole folder onto the page. A dragged folder keeps its folder tree. Keep the page open until the files finish transferring; after that you can leave and come back.

## Upload from the CLI, Python or an agent

<tabs>
<tabs-item label="CLI">

```sh
flashdrive upload ./report.pdf --wait
flashdrive upload ./notes --recursive --wait
```

`--recursive` uploads a local folder with its folder tree. `--dry-run` shows what would be sent. If an upload is interrupted, resume it with the run ID the CLI printed: `flashdrive upload resume RUN_ID --wait`. See [CLI uploads and recovery](https://docs.flashdrive.space/cli/uploads-and-recovery).

</tabs-item>

<tabs-item label="Python">

```python
from flashdrive import Flashdrive

with Flashdrive(drive_id="DRIVE_ID") as client:
    batch = client.upload(["report.pdf", "data.parquet"])
    for f in batch.files:
        print(f.status)
```

By default the SDK waits until each file is ready. Pass `wait=False` to return as soon as the transfer finishes. See [upload files](https://docs.flashdrive.space/sdk/upload-files).

</tabs-item>

<tabs-item label="MCP">

Agents upload with `prepare_upload`, `upload_transfer` and `complete_upload`, and follow progress with `get_upload`. On a mounted drive, an agent can simply write files into the folder. See [manage content](https://docs.flashdrive.space/mcp/manage-content).

</tabs-item>
</tabs>

To work on a drive's files in place instead of uploading copies, [mount the drive](https://docs.flashdrive.space/cli/mount-and-sync).

## What happens to each file

<table>
<thead>
  <tr>
    <th>
      Files
    </th>
    
    <th>
      What happens
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      PDF, Word (<code>
        .docx
      </code>
      
      ), plain text (<code>
        .txt
      </code>
      
      ), Markdown (<code>
        .md
      </code>
      
      )
    </td>
    
    <td>
      Stored, and their text is read so you can <a href="https://docs.flashdrive.space/getting-started/find-files">
        read them by line and grep them
      </a>
      
      . TXT and Markdown use UTF-8.
    </td>
  </tr>
  
  <tr>
    <td>
      Anything else: code, photos, video, audio, archives, data sets, model weights
    </td>
    
    <td>
      Stored as they are, with format <code>
        file
      </code>
      
      . Their name, size and type are recorded, and for media files some header facts such as dimensions or duration. Their text is not read.
    </td>
  </tr>
</tbody>
</table>

Every file can be listed, found by path, downloaded, streamed through a file link and read by byte range, whatever its type.

A file appears in its drive (in the Console, the API, MCP, the CLI and a mounted drive) as soon as its transfer finishes, and its bytes can be read at once. For PDF, Word, text and Markdown files, the file's `text_status` shows whether its text is ready:

<table>
<thead>
  <tr>
    <th>
      <code>
        text_status
      </code>
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        processing
      </code>
    </td>
    
    <td>
      The file is stored and listed, and its text is being read. When you replace a file, reads return the previous text until the new text is ready.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        text
      </code>
    </td>
    
    <td>
      The text is ready to read and grep.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        none
      </code>
    </td>
    
    <td>
      The file has no text to read. <code>
        text_status_reason
      </code>
      
       says why.
    </td>
  </tr>
</tbody>
</table>

<table>
<thead>
  <tr>
    <th>
      <code>
        text_status_reason
      </code>
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        not_text_format
      </code>
    </td>
    
    <td>
      The file is not a PDF, Word, text or Markdown file.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        no_text_layer
      </code>
    </td>
    
    <td>
      The file has no text layer, such as a scanned PDF. Run OCR and upload the result if you need its text.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        extraction_failed
      </code>
    </td>
    
    <td>
      The file is stored, but its text could not be read.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        too_large_to_index
      </code>
    </td>
    
    <td>
      The file is stored and can be downloaded and read by byte range, but only a bounded prefix is searchable. The original remains available.
    </td>
  </tr>
</tbody>
</table>

Renaming or moving a file does not read it again.

## Upload capacity

Each drive has a limit on uploads in progress at one time. Beyond it, a new upload answers `upload_limit`; wait for earlier files to finish, then continue. Other drives have their own allowance.

For a large collection of UTF-8 text and Markdown files, a bulk import sends files in large chunks, saves progress locally and continues after an interruption. One import takes at most 100,000 files; split a larger collection into several imports. See [bulk imports](https://docs.flashdrive.space/sdk/bulk-imports).

## Resolve common failures

<table>
<thead>
  <tr>
    <th>
      Error
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        file_too_large
      </code>
    </td>
    
    <td>
      The file is over 10,000,000,000 bytes. Split it, or store it in parts.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        storage_capacity_exceeded
      </code>
    </td>
    
    <td>
      The upload would go past your available storage. Free up space or add storage; see <a href="https://docs.flashdrive.space/platform/storage-and-upgrades">
        storage
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        drive_limit_exceeded
      </code>
    </td>
    
    <td>
      The drive is at its file or storage limit. Use another drive or remove files.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        upload_limit
      </code>
    </td>
    
    <td>
      The drive is at its transfer or queue limit. Wait, then retry.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invalid_filename
      </code>
    </td>
    
    <td>
      Remove path separators and control characters from the file name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invalid_file
      </code>
    </td>
    
    <td>
      Open the file in its original application, save a fresh copy, and upload that.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pdf_password_required
      </code>
    </td>
    
    <td>
      Save an unlocked copy you are allowed to use, and upload that.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        no_extractable_text
      </code>
    </td>
    
    <td>
      The file has no readable text. For a scan, run OCR and upload the result.
    </td>
  </tr>
</tbody>
</table>

If a transfer is interrupted, keep the original file and the upload or run ID, then follow the [recovery steps](https://docs.flashdrive.space/sdk/upload-recovery).


## Sitemap

See the full [sitemap](https://docs.flashdrive.space/sitemap.md) for all pages.
