Uploading video via media.upload() not working.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- grpc, typescript
- 領域
- api
調査の方向性
Start with the media.upload() documentation and its supported media types, then reproduce the reported failures with the sample webm and mp4 uploads using the shown TypeScript call. Done means the supported video behavior is verified and either video uploads work as documented or the documentation accurately states their limitations.
索引モデルが issue の本文から書いたものです。
説明
I read in the docs that media.upload() supports uploading video types with not much documentation on filetypes, limits or any meaningful information on that.
So I tried adding video uploads to my App:
const uploadPromises = matches.map(async (match) => {
const dataUrl = match[1];
const mediaCategory = match[2];
const extension = match[3]?.toLowerCase();
let mediaType: 'gif' | 'image' | 'video' = 'image';
if (mediaCategory === 'video') {Z
mediaType = 'video';
} else if (extension === 'gif') {
mediaType = 'gif';
}
console.log('Uploading media:', { mediaType });
const response = await media.upload({ url: String(dataUrl), type: mediaType });
return { dataUrl: String(dataUrl), mediaUrl: response.mediaUrl };
});
const uploadResults = await Promise.all(uploadPromises);
for (const res of uploadResults) {
finalContent = finalContent.replace(res.dataUrl, res.mediaUrl);
}
However I tried uploading a sample webm file and it returns:
Failed to upload media: Error: 2 UNKNOWN: stream error: stream ID 10557; PROTOCOL_ERROR; received from peer
I also tried an mp4 file:
Failed to upload media: Error: 2 UNKNOWN: grpc invocation failed with status 2; unable to poll media URL https://i/. redd. it/xxxxx.mp4 failed to poll media after 5 polling timestamps
I tried different file sizes. Even at 900KB it fails. Not sure why this happens. Can anybody confirm if I am doing something wrong?
I am not sure if I am doing something wrong or not. Not even sure if video uploads is even supported and that docs might need updating.
If I am not doing it wrong then you either need to update docs removing video as supported mediaType to avoid confusion or add the support.
- 主要言語
- TypeScript
- スター
- 210
- フォーク
- 88
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reddit/devvit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
copse-dev/agent-pane#2953 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·