github-tools / github-tools/github

Allow binary blobs

オープン
#23 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
JavaScript
スター
3.8k
フォーク
809
PR マージ指標
30日以内にマージされた PR はありません

説明

In order to safely transfer binary blobs/filtes, the API needs to use base64 encoding when appropriate. postBlob() however always uses "utf-8". So there needs to be either an additional argument in write() and postBlob() that specifies the encoding, or postBlob() needs to detect if the file is binary or not, and adjust the encoding automatically.

This little snippet seems to be able to detect binary data:

```
/[\x00-\x08\x0E-\x1F]/.test(data)
```

See http://stackoverflow.com/questions/1677644/detect-non-printable-characters-in-javascript

I'm currently dealing with similar issues in Prose: https://github.com/prose/prose/pull/255

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the postBlob() and write() entry points and inspect how they currently choose UTF-8 encoding. Determine how binary data should be identified or explicitly encoded, then verify that binary blobs transfer safely while existing text uploads retain their current behavior.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。