Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary files are corrupted after downloaded from the project #1342

Closed
mgubaidullin opened this issue Jul 24, 2024 · 2 comments
Closed

Binary files are corrupted after downloaded from the project #1342

mgubaidullin opened this issue Jul 24, 2024 · 2 comments

Comments

@mgubaidullin
Copy link
Contributor

Describe the bug

Binary files are corrupted after downloaded from the project

Steps to reproduce the behavior

  1. Upload file to the project
  2. Download file from the project

Variant

Web Application

Container Management (if applicable)

None

Operating System (if applicable)

None

Version

4.6.0

Relevant log output

No response

@mgubaidullin mgubaidullin added the bug Something isn't working label Jul 24, 2024
@mgubaidullin mgubaidullin added this to the 4.8.0 milestone Jul 24, 2024
@mgubaidullin mgubaidullin removed the bug Something isn't working label Sep 16, 2024
@mgubaidullin mgubaidullin removed this from the 4.8.0 milestone Sep 17, 2024
@Anik-Bardhan
Copy link

Anik-Bardhan commented Sep 30, 2024

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?

@mgubaidullin
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants