Handling dynamic headers from transformFile
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
src/AjaxUploader.jsx の、upload リクエストに渡される headers から始め、issue に記載されている transformFile のフローを確認してください。動作と合わせて README の headers の項目を更新してください。変換後のファイルを受け取る関数として headers を指定でき、オブジェクト形式の headers も引き続き機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi there!
We have a situation where we use rc-upload in the following manner:
- User selects file on file system
- We use
transformFileto encrypt the contents of that file on the browser - The encryption generates additional metadata that we want to pass as headers
- This metadata is not available until transformFile is completed.
It would be great if headers could also be a function that takes in the result of transformFile and returns the headers.
I tried to make a PR for this but it was not possible bc of permissions.
The changes to do this are pretty quick:
in AjaxUploader.tsx
change
headers: props.headers,
to
headers: typeof props.headers === 'function' ? props.headers(transformedFile) : props.headers,
and also update the README comment to me
|headers| object/function(blob) | {} | http headers to post, available in modern browsers. Can be a function that takes in the result of transformFile |
- 主要言語
- TypeScript
- スター
- 804
- フォーク
- 323
- 平均マージ
- 12分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/upload のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
react-component/upload#170 ·
-
HVAC website オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
react-component/upload#697 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 15/100
react-component/upload#615 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
react-component/upload#522 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
react-component/upload#515 ·
react-component/upload の issue をすべて見る
似ている issue
-
難易度 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 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·