# Upload files

> Upload files and folders in the console, and learn about the task list, multipart and concurrency, Content-Type, size limits, and retries.

Console upload suits a small number of files and one-off tasks. For bulk sync, automation, and very large files, use an [SDK](https://docs.bitiful.com/en/developer/sdk/intro.md) or [Rclone](https://docs.bitiful.com/en/best-practice/solutions/rclone.md).

## Upload steps

### Open the upload page

Under **Object Storage (对象存储) › [Bucket list (桶列表)](https://console.bitiful.com/buckets)**, click the bucket name to open **File management (文件管理)**. To upload into a directory, open that directory first, then click **Upload files (上传文件)** in the upper-right corner.

### Choose the upload location

**Upload to (上传到)** has two options:

- **Current directory (当前目录)**: Upload to the directory you were just in.
- **Specified directory (指定目录)**: Append another path after the current directory. For example, enter `2026/11`. Directories that don't exist are created automatically.

Rules for the specified directory: the full path (directory plus file name) is at most 1024 bytes in UTF-8; no emoji; can't begin with `/` or `\`; no consecutive `/`; no level named `..`. A trailing `/` is optional.

### Add files

- Drag files or folders into the dashed box.
- Or click **Scan files (扫描文件)** and select one or more files.
- Or click **Scan folder (扫描文件夹)** and select a folder, which keeps its original directory structure.

You can add files multiple times. Files appear in the table below with the status **Scanned, pending upload (已扫描待上传)**. Click **Remove (移除)** for any you don't need.

### Start the upload

Click **Upload files** below the table, and the **Task list (任务列表)** opens on the right. You can keep browsing other console pages without interrupting the upload.

> **Warning**
>
> Files with the same name are overwritten without any prompt, and there is no version history to restore from.

## Size and file name limits

| Item                             | Limit                                                                                                                                                             |
| :------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Single file in the console       | Up to 100 GiB. Larger files are marked "文件大小不能超过100.00 GiB" (file size can't exceed 100.00 GiB) and aren't uploaded                                               |
| S3 API single upload (PutObject) | Up to 20 GiB                                                                                                                                                      |
| S3 API multipart upload          | Up to 20 GiB per part, at most 10,000 parts                                                                                                                       |
| File name                        | UTF-8 encoded, case-sensitive, can't begin with `/` or `\`. For the full requirements, see [Object naming](https://docs.bitiful.com/en/bitiful-s4/definitions.md) |

For files larger than 100 GiB, use the multipart upload of an S3 SDK.

## Task list

The task list opens automatically after you start an upload. You can also open it at any time with the **Task list** icon at the top of the console. The **Upload list (上传列表)** groups tasks by status:

| Status               | Description                                                  | Available actions       |
| :------------------- | ------------------------------------------------------------ | ----------------------- |
| **Pending (待上传)**    | Queued                                                       | **Stop upload (停止上传)**  |
| **Uploading (上传中)**  | Shows a percentage                                           | **Stop upload**         |
| **Stopped (已停止)**    | Stopped manually. It can't resume and must be uploaded again | **Clear record (清除记录)** |
| **Succeeded (上传成功)** | Written to the bucket                                        | **Clear record**        |
| **Failed (上传失败)**    | Still failed after multiple retries                          | **Clear record**        |

**Stop all uploads (停止全部上传)** stops every unfinished task. **Clear all records (清除全部记录)** clears only stopped, succeeded, and failed records and doesn't delete files in the bucket.

> **Warning**
>
> Refreshing or closing the browser cancels uploads in progress and clears all records. Console upload **doesn't support resuming**. If an upload is interrupted, you need to upload that file again.

### Start sharing while uploading

For files smaller than 10 GiB, an icon labeled "no-wait启用中, 文件上传中即可开始下载。" (no-wait is on; the file can be downloaded while it uploads) appears during the upload. Hover over the link icon on the right of the task to choose **Copy public URL (复制公开URL)** or **Copy signed URL (复制签名URL)**. The recipient can start downloading without waiting for the upload to finish. For how it works and its limits, see [Simul-Transfer](https://docs.bitiful.com/en/bitiful-s4/features/simul-transfer.md).

## Multipart, concurrency, and retries

| Item                            | Console behavior                                                                |
| :------------------------------ | ------------------------------------------------------------------------------- |
| Files uploaded at the same time | 5; the rest are queued                                                          |
| Files smaller than 10 GiB       | Sent in a single request, not split into parts                                  |
| Files of 10 GiB or larger       | Automatically split into parts of 500 MiB each, with 5 parts uploaded at a time |
| Retries on failure              | Each file or part is attempted up to 9 times, then marked as failed             |
| Multipart task fails or stops   | Parts already uploaded are cleaned up automatically                             |

## Content-Type

Browsers use Content-Type to decide how to handle a file, and image and video processing also depend on it.

- For console uploads, S4 uses the type the browser detects.
- If the browser can't detect it, S4 [detects it automatically](https://docs.bitiful.com/en/best-practice/auto-detect-mime.md) from the extension and file content.
- When you upload with an SDK, we recommend setting `ContentType` explicitly, or leaving it empty to let S4 detect it.

If the type is wrong, upload again to overwrite. You can also use CopyObject to copy the object onto itself with `MetadataDirective=REPLACE` and the correct `ContentType`, without re-uploading the data. Include any other metadata you want to keep, such as `CacheControl`.

## Upload from the command line

```bash
# Upload a single file
aws s3 cp ./logo.png s3://my-bucket/images/logo.png \
  --endpoint-url https://s3.bitiful.net --region cn-east-1

# Sync an entire directory
aws s3 sync ./dist s3://my-bucket/site/ \
  --endpoint-url https://s3.bitiful.net --region cn-east-1
```

For installation and configuration, see [AWS CLI / s5cmd](https://docs.bitiful.com/en/best-practice/solutions/aws-cli.md).

## FAQ

<details>
<summary>An upload failed. How do I troubleshoot?</summary>

1. Check your network, especially proxy software and browser extensions.
2. If the account is locked because of an overdue balance, uploads are rejected. Top up first.
3. Check whether the file name contains unsupported characters. See [Object naming](https://docs.bitiful.com/en/bitiful-s4/definitions.md).

</details>

<details>
<summary>Uploading many small files is slow</summary>

The console uploads only 5 files at a time. For many small files, use [Rclone](https://docs.bitiful.com/en/best-practice/solutions/rclone.md) or [s5cmd](https://docs.bitiful.com/en/best-practice/solutions/aws-cli.md) and raise the concurrency.

</details>

<details>
<summary>New files don't appear in the file list after upload</summary>

Click the **Refresh list (刷新列表)** icon to the right of the breadcrumb above the list.

</details>

<details>
<summary>I want users to upload to the bucket directly from a web page</summary>

Have your server issue presigned URLs. See [Upload files securely from the client](https://docs.bitiful.com/en/best-practice/web-uploads.md).

</details>
