Skip to content

feat(Upload): optimize the logic for determining if a file is duplicated#2330

Merged
uyarn merged 1 commit into
developfrom
chore/upload/validateFile
Nov 21, 2025
Merged

feat(Upload): optimize the logic for determining if a file is duplicated#2330
uyarn merged 1 commit into
developfrom
chore/upload/validateFile

Conversation

@anlyyao
Copy link
Copy Markdown
Collaborator

@anlyyao anlyyao commented Nov 17, 2025

背景

  • 移动端拍照上传,通常会生成相同的文件名(比如 image.jpg 或类似的默认名称),导致第二张照片(后序拍照上传文件)被同名文件验证逻辑过滤掉

issues: Tencent/tdesign-mobile-vue#1641

分析

    1. 当 capture 被明确指定值,一定是通过调用设备的媒体设备(比如:摄像头)捕获上传文件,该类文件跳过重复文件名校验
    1. capture 未被启用,此时移动端有 本地文件/本地图册/拍照 三种途径获取上传文件,无法判断文件是否为拍照上传

方案

@tdesign-bot
Copy link
Copy Markdown
Collaborator

tdesign-bot commented Nov 17, 2025

TDesign Component Repositories CI Test Open

Component Lint Test Build Preview
tdesign-vue 👀
tdesign-vue-next 👀
tdesign-react 👀
tdesign-web-components 👀
tdesign-mobile-vue 👀
tdesign-mobile-react 👀

@anlyyao anlyyao requested review from chaishi and uyarn November 17, 2025 08:44
@liweijie0812
Copy link
Copy Markdown
Collaborator

影响到pc 端,三个测试案例都挂了
image

@anlyyao anlyyao marked this pull request as draft November 20, 2025 05:29
@anlyyao anlyyao force-pushed the chore/upload/validateFile branch 2 times, most recently from c559056 to a0d19b2 Compare November 20, 2025 07:32
@anlyyao anlyyao force-pushed the chore/upload/validateFile branch from a0d19b2 to 0d0a9a7 Compare November 20, 2025 07:35
@anlyyao anlyyao marked this pull request as ready for review November 20, 2025 07:40
@anlyyao
Copy link
Copy Markdown
Collaborator Author

anlyyao commented Nov 20, 2025

影响到pc 端,三个测试案例都挂了 image

已处理

@uyarn uyarn merged commit 2b0b543 into develop Nov 21, 2025
4 checks passed
@uyarn uyarn deleted the chore/upload/validateFile branch November 21, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants