Conversation
|
Tests:
|
|
@copilot take a look. Don't commit any changes, just explain what could be the issue and how it can be fixed |
Root cause: In How to fix: The
This would handle both binary files and large files (up to 100MB) correctly, since the raw binary data never goes through text decoding. (Note: the empty/0-byte file issue with |
@fregante do we need that option? I think |
|
Limiting the whole feature to <1MB is definitely a downgrade, so that's out of the question. A common file I restore is package-lock.json, which is too often very large (monorepos and such) As for the binary option, it would be ok as long as we don't have to manually toggle between two fetching modes in this feature. I think that would introduce many points of failure. What do you think? |
|
|
Worth a separate PR |
| const {content} = await api.v3( | ||
| `contents/${filePath}?ref=${ref}`, | ||
| { | ||
| json: false, | ||
| base64: true, |
There was a problem hiding this comment.
This was the only feature that used textContent. Not the only one that used json: false, though

Resolves #8110
Test URLs
https://github.com/refined-github/sandbox/pull/128/changes#diff-e31df6ca67b7e6390cb4e019f9a614ec44caafec9956f6b46eb2392846213809
Screenshot