UrielCh / proxmox-api

TypeScript Api for proxmox
56 stars 15 forks source link

FileRestore: unexpected contentType "application/octet-stream" #14

Closed DariusRDev closed 1 year ago

DariusRDev commented 1 year ago

This Request is needed to download a file from the file Restore

 let result = await proxmox.nodes
                .$("node02-prox")
                .storage.$("prox-back-02")
                ["file-restore"].download.$get({
                    volume: backup.volid,
                    filepath: .path,
                }
);
DariusRDev commented 1 year ago

Problem your tinyrequest Lib doesnt work with streams

UrielCh commented 1 year ago

undici gonna replace this tiny lib, past a code sample to help me to reproduce the issue. and fix this case.

UrielCh commented 1 year ago

just migrated to undici fetch, and need some test...

UrielCh commented 1 year ago

have you another call that returns a stream, I do not have any Proxmox Backup Server available here to test.

DariusRDev commented 1 year ago

Sry i dont now of any other endpoint

UrielCh commented 1 year ago

okey.

can I set up a Proxmox Backup Server inside a Proxmox and reference it from the Proxmox it runs on? that should be a valid test environment.

UrielCh commented 1 year ago

you can try V 0.4.2. you will get back a { ReadableStream } from "stream/web"

UrielCh commented 1 year ago

let's say that it's fixed.