[pve-devel] [pbs-devel] applied: [PATCH proxmox-backup 2/2] api/datastore: allow pxar file download of entire archive
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Apr 13 09:29:11 CEST 2021
On 13.04.21 09:23, Dominik Csapak wrote:
> On 4/13/21 08:39, Thomas Lamprecht wrote:
>> But that API is definitively weird in general...
>
> just fyi
>
>>
>> 1. old style API definition, should use the #[api()] macro instead
>
> the api macro cannot handle AsyncHttp api calls (yet?), but this is required for the stream
that shoudn't be a hard problem, it's a macro it can expand to whatever..
>> 2. perly "params: Value", yeah, no thanks.
>
> a result from above, without api macro no de-structuring of parameters
see above
>
>> 3. hard coded return stream type, one should be able to download also a single
>> file as zip, and we knew that we wanted .tar then too, so not providing an
>> param for that is weird.
>
> we always can add as much, but until now, generating a zip for a single
> file was not really sensible
Compression isn't the only benefit a encapsulation like an archive format.
>
>> 4. accessed via /json/ path but never returns json
>
> all api calls need a formatter to call, should we add a
> new one for download type?
I know that all paths have a formatter, does not validates misusing JSON
for something completely different ;)
More information about the pve-devel
mailing list