Skip to content

Upload component sets status: "error" for cloud-only files #55694

Open
react-component/upload
#685

Description

@mleister97

Reproduction link

https://ant.design/components/upload

Steps to reproduce

When using the Ant Design Upload or Dragger component, files that exist only in cloud storage (OneDrive, iCloud, Google Drive) automatically get status: "error" and cannot be uploaded.

  1. Use Ant Design Upload or Dragger component.
  2. Select a file that exists only in cloud storage (e.g., OneDrive, iCloud, Google Drive).
    On Android devices, this can happen when selecting a file directly from the cloud picker.

What is expected?

The file should be uploaded normally or a proper error notification should be shown.

The file should not get stuck in status: "error" automatically.

What is actually happening?

  • The file immediately gets status: "error".
  • The upload does not proceed, and onChange shows the file as failed.
Environment Info
antd 5.28.1
React 18.3.1
System Windows 11
Browser Latest Chrome

Proposed solution:
To handle cloud-only files, read the file fully into memory and create a new File object before uploading:

const buffer = await file.arrayBuffer();
const clone = new File([buffer], file.name, { type: file.type });
return clone; // upload this clone instead

This ensures that cloud-only files are treated as real File objects and prevents the automatic status: "error" state.

Activity

  1. mleister97 commented on Nov 12, 2025

    @mleister97
    Author
    video5812456937635191453.mp4
  2. github-actions commented on Nov 13, 2025

    @github-actions
    Contributor

    Hello @mleister97, We need you to provide an online reproduction example to help us investigate the issue. You can either fork this online reproduction template or create a minimal project repository using our Scaffolding Guide. This issue will be automatically closed if no follow-up is made within 3 days.

    你好 @mleister97,我们需要你提供一个在线的重现示例以便于我们帮你排查问题。你可以通过 fork 这个在线重现模板,或者基于我们的脚手架指南 新建一个最小化项目仓库。3 天内未跟进此 issue 将会被自动关闭。

    什么是最小化重现,为什么这是必需的?

  3. mleister97 commented on Nov 13, 2025

    @mleister97
    Author

    @afc163
    The issue also occurs directly on your website, which is why I didn’t include a reproducible example. I tested it on several different devices — Safari on iOS with iCloud, a Google Pixel, and a Samsung device using files from Google Drive. The problem happens everywhere when selecting a file from a cloud source.
    I’ve attached a video showing the issue, and I can also upload one from an iPhone/iCloud if needed. The current reproduction link is just a regular upload field.

    https://codesandbox.io/p/devbox/mutable-waterfall-47nwfq?workspaceId=ws_UJWDJFW6u5eT5bSdmMxLcC

  4. added
    help wantedThe suggestion or request has been accepted, we need you to help us by sending a pull request.
    and removed on Nov 14, 2025
  5. github-actions commented on Nov 14, 2025

    @github-actions
    Contributor

    Hello @mleister97. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

    你好 @mleister97,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

    giphy

  6. divyeshagrawal commented on Nov 27, 2025

    @divyeshagrawal
    Contributor

    Hello! Can this issue be assigned to me?

  7. github-actions commented on Dec 12, 2025

    @github-actions
    Contributor

    @divyeshagrawal 这个 issue 已经超过 14 天没有更新或关联 PR。如果您仍在处理这个 issue,请更新进度;如果您无法继续处理,请联系维护者重新分配。

    This issue has been inactive for more than 14 days without any updates or linked PR. If you are still working on this issue, please provide a progress update. If you are unable to continue, please contact the maintainers for reassignment.

  8. kanaseprathamesh568-a11y commented on Sep 25, 2026

    @kanaseprathamesh568-a11y
    Contributor

    Hi maintainers, since this issue has been inactive for a while, I'd like to take it over and investigate the cloud file selection handling in the Upload component. I will submit a PR with reproduction tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Inactivehelp wantedThe suggestion or request has been accepted, we need you to help us by sending a pull request.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions