Skip to content

feat(up,uploader): add --video/--audio flags and forced media type handling#1053

Open
Andre-cc wants to merge 1 commit intoiyear:masterfrom
Andre-cc:master
Open

feat(up,uploader): add --video/--audio flags and forced media type handling#1053
Andre-cc wants to merge 1 commit intoiyear:masterfrom
Andre-cc:master

Conversation

@Andre-cc
Copy link
Copy Markdown

添加强制设置文件类型的参数,解决视频文件上传会被识别为音频文件的问题

@Andre-cc Andre-cc requested a review from iyear as a code owner September 23, 2025 14:45
@XMLHexagram
Copy link
Copy Markdown
Collaborator

XMLHexagram commented Oct 15, 2025

First of all, if you want to add the force video/audio feature, please follow the code style of the existing AsPhoto implementation. Add AsVideo() and AsAudio() to the type Elem interface in core/uploader/iter.go, and use them properly in uploader.go.

Second, I'm uncertain about the thing you described where a video might be misidentified as an audio. In my opinion, judging by reading the MIME type should not lead to such misidentification. Therefore, could you please provide a file that can reproduce this issue?

Finally, could you please respond in English? While the project doesn't force you using English in PRs, this requirement exists for issues. Therefore, I believe it would be best to maintain language consistency. If you're not confident in your English level, feel free to use any translation tools.

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.

2 participants