public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Stefan Reiter <s.reiter@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [pbs-devel] applied: [PATCH proxmox-backup 2/2] api/datastore: allow pxar file download of entire archive
Date: Tue, 13 Apr 2021 09:23:39 +0200	[thread overview]
Message-ID: <d5cce679-33a1-1c0c-35ec-c6739a339b07@proxmox.com> (raw)
In-Reply-To: <3e6c8636-f44a-6c23-b782-d567f2446fff@proxmox.com>

On 4/13/21 08:39, Thomas Lamprecht wrote:
> On 12.04.21 17:32, Stefan Reiter wrote:
>> Treat filepaths like "/root.pxar.didx" without a trailing slash as
>> wanting to download the entire archive content instead of erroring. The
>> zip-creation code already works fine for this scenario.
>>
>> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
>> ---
>>   src/api2/admin/datastore.rs | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
> 
> applied, thanks!
> 
> 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

> 2. perly "params: Value", yeah, no thanks.

a result from above, without api macro no de-structuring of parameters

> 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

> 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?

> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 





  reply	other threads:[~2021-04-13  7:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 15:32 [pve-devel] [PATCH proxmox-widget-toolkit 1/2] FileBrowser: allow downloading root folder and simplify code Stefan Reiter
2021-04-12 15:32 ` [pve-devel] [PATCH proxmox-backup 2/2] api/datastore: allow pxar file download of entire archive Stefan Reiter
2021-04-13  6:39   ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2021-04-13  7:23     ` Dominik Csapak [this message]
2021-04-13  7:29       ` [pve-devel] [pbs-devel] applied: " Thomas Lamprecht
2021-04-13  7:02 ` [pve-devel] applied: [PATCH proxmox-widget-toolkit 1/2] FileBrowser: allow downloading root folder and simplify code Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5cce679-33a1-1c0c-35ec-c6739a339b07@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.reiter@proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal