Closed mgubaidullin closed 2 days ago
Hey @mgubaidullin. I think I spotted the issue for this.
function download(file: ProjectFile) {
if (file) {
const type = file.name.endsWith("yaml") ? "application/yaml;charset=utf-8" : undefined;
const f = new File([file.code], file.name, {type: type});
FileSaver.saveAs(f);
}
}
This code snippet is from FilesTab.tsx file. Here the construction of the File object needs to be handled differently for binary files. My guess is that for binary file.code needs to be converted into a BLOB type. Can I experiment on this idea? Can this ticket be assigned to me?
I am pretty sure that this is not the case. Files code stored as text everywhere in Karavan. It was designed like this because Karavan operates with source code of an application that finally stored in git.
I believe that is is not a good idea to store binary data in git. That is why this ticket was not implemented in 4.8.0
Describe the bug
Binary files are corrupted after downloaded from the project
Steps to reproduce the behavior
Variant
Web Application
Container Management (if applicable)
None
Operating System (if applicable)
None
Version
4.6.0
Relevant log output
No response