-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Browsers
Chrome
OS
Linux
Description
uploadFiles() has four steps
- get the branch data including current commit hash
- add files into the tree
- create a new commit
- update the branch
At the second step, tree parameter is supposed to get different mode depend on the file type.
๋๋ฒ์งธ ๋จ๊ณ์์, tree ๋งค๊ฐ๋ณ์๋ ํ์ผ์ ์ ํ์ ๋ค๋ผ ๋ค๋ฅธ mode ๊ฐ์ ๊ฐ์ ธ์ผ ํฉ๋๋ค.
Reasons
// add files into the tree
const tree = await octokit.rest.git.createTree({
owner: userName,
repo: repoName,
base_tree: baseTree,
tree: files.map((file) => ({
path: file.path,
content: file.content,
mode: '100644',
})),
});It is a problem that when image file is added, the file goes broken.
์๋ฅผ ๋ค๋ฉด ์ด๋ฏธ์ง ํ์ผ์ ์ฌ๋ฆฌ๋ฉด, ํ์ผ์ด ๊นจ์ง๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
We should fix it so that it can add any types of files.
์ด๋ค ์ ํ์ ํ์ผ์ด๋ ์ถ๊ฐํ ์ ์๋๋ก ๊ณ ์ณ์ผ ํฉ๋๋ค.
Reproduction URL
localhost:8080/
Reproduction Steps
1. Add a function that check if file is image
์ด๋ฏธ์ง ํ์ผ์ธ์ง ํ์ธํ๋ ํจ์๋ฅผ ๋ง๋ ๋ค.
2. Figure out how to add image file as it is. NOT AS STRING.
์ด๋ป๊ฒ ์ด๋ฏธ์ง ํ์ผ์ ์๋ ๊ทธ๋๋ก ์ฌ๋ฆด์ง ์์๋ธ๋ค. ๋ฌธ์์ด๋ก๊ฐ ์๋๋ผ.Solutions
No response
Screenshots
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working