mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-12 16:41:29 +00:00
fix: corrupted binary downloads (#634)
- The existing setup was using the text reader endpoint for downloading files `fsPromises.readFile(..., 'utf8')` at line 801. This was incorrect - In the old Files tab flow, the client then took that decoded string and rebuilt it as a text blob. That UTF-8 decode/re-encode step changes raw bytes, so the downloaded file no longer matches the original. Folder ZIP export had the same problem for any binary file inside the archive. Co-authored-by: Haileyesus <something@gmail.com>
This commit is contained in:
@@ -111,6 +111,8 @@ export const api = {
|
||||
}),
|
||||
readFile: (projectName, filePath) =>
|
||||
authenticatedFetch(`/api/projects/${projectName}/file?filePath=${encodeURIComponent(filePath)}`),
|
||||
readFileBlob: (projectName, filePath) =>
|
||||
authenticatedFetch(`/api/projects/${projectName}/files/content?path=${encodeURIComponent(filePath)}`),
|
||||
saveFile: (projectName, filePath, content) =>
|
||||
authenticatedFetch(`/api/projects/${projectName}/file`, {
|
||||
method: 'PUT',
|
||||
@@ -242,4 +244,4 @@ export const api = {
|
||||
method: 'DELETE',
|
||||
...options,
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user