Thanks to visit codestin.com
Credit goes to github.com

Skip to content

writeBinaryFile **DOES NOT WORK** even though correct USAGE! [2021 ISSUE] #1133

@copyandexecute

Description

@copyandexecute

Dear Tauri Team,
I am trying to download a jar file and then save it with your provided funcation "writeBinaryFile". Unfortunately it does not work.

await axios({
         url: '/downloads/client/latest.jar',
         method: "GET",
         responseType: "blob", // important
         onDownloadProgress: (progressEvent) => {
           setProgress(Math.round((progressEvent.loaded * 100) / progressEvent.total));
         }
       }).then(async value => {
         const mcDir = await promisified({cmd: "minecraftDir"});
         console.log(mcDir)
         console.log(value)
         console.log(value.data)
         await writeBinaryFile({contents: value.data, path: mcDir + "/norisk/test.jar"}, {});
       })

It creates an EMPTY + CORRUPTED File.
Whats the correct use?

Your sincerely,
Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions