Tencent / Tencent/tdesign-flutter

[TDUpload] 不能选择视频,demo apk也不行

Open
#681 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

IssueShoot
Dominant language
Dart
Stars
1.2k
Forks
182
Avg merge
2d 2h
Merged PRs (30d)
88

Description

tdesign-flutter 版本

0.2.3

重现链接

No response

重现步骤/代码
TDUpload(
      max: 2,
      multiple: true,
      files: files,
      width: 200.r,
      height: 200.r,
      mediaType: const [TDUploadMediaType.video],
      enabledReplaceType: true,
      onMaxLimitReached: () {
        print("文件太多了");
      },
      onChange: (tmp, event) {
        switch (event) {
          case TDUploadType.add:
            files.addAll(tmp);
          case TDUploadType.remove:
            files.removeWhere((v) => v.key == tmp.first.key);
          case TDUploadType.replace:
            final idx = files.indexWhere((v) => v.key == tmp.first.key);
            if (idx != -1) files[idx] = tmp.first;
        }
        setState(() {});
      },
    )
期望结果

能正常选择视频

实际结果

只能选择图片

Flutter版本

3.27.4

设备与机型信息

XIaomi 15

系统版本

Android 15

补充说明

No response

IssueShoot

预估时长:3
期望完成时间:2025-8-7
开发难度:中
参与人数:1
需求对接人:jackjflin
验收标准:实现期望改造效果,提 MR并通过 验收无误
备注:最终激励以实际提交 pr 并合并为准。TDesignFlutter贡献指南:https://tdesign.tencent.com/flutter/develop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TDUpload implementation and the demo APK, using the supplied mediaType: video example on Android 15. Trace why selection falls back to images, then verify that video-only selection works in both the demo and the reported configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.