You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently text files are saved to a tempfile, then read with read_utf8() and written to the final destination with write_over(), presumably to ensure the file has utf8 enconding (and maybe normalize line endings?).
For non-text files, we should just copy the downloaded file to its final destination.
Activity
ateucher commentedon Sep 19, 2025
Currently text files are saved to a tempfile, then read with
read_utf8()and written to the final destination withwrite_over(), presumably to ensure the file has utf8 enconding (and maybe normalize line endings?).For non-text files, we should just copy the downloaded file to its final destination.
The github contents API (https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content) doesn't appear to give the MIME type of the file, so we need to figure it out ourselves. I am going to use
mime::guess_mime_type()to get started, even though it adds a new dependency.Add support for non-text files in use_github_file()