Skip to content

Commit ff5e99c

Browse files
committed
Merge pull request #103 from StevensonCMS/master
Adding support for updating binary files
2 parents 5c9c83f + 2c7ab31 commit ff5e99c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

github.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,12 @@
357357
"content": content,
358358
"encoding": "utf-8"
359359
};
360-
}
360+
} else {
361+
content = {
362+
"content": btoa(String.fromCharCode.apply(null, new Uint8Array(content))),
363+
"encoding": "base64"
364+
};
365+
}
361366

362367
_request("POST", repoPath + "/git/blobs", content, function(err, res) {
363368
if (err) return cb(err);

0 commit comments

Comments
 (0)