On 26.04.22 14:35, Daniel Tschlatscher wrote:
> Creating the filestream for the tasklog download is sourced in its own
> function to avoid redundant implementations in pmg-api and pve-manager
> .
> 
> Signed-off-by: Daniel Tschlatscher <d.tschlatsc...@proxmox.com>
> ---
>  src/PVE/Tools.pm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index dac0a2b..ec8681a 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -2016,4 +2016,31 @@ sub get_file_hash {
>      return lc($digest);
>  }
>  
> +sub stream_logfile {

could be a more generic `stream_file` too with an additional $content_type 
param that defaults
to 'text/plain', as there's nothing really log specific in there.

But just for that you won't need to send a v2, I'll need to look at the rest 
more closely
later and may only get around that earliest in the next week .



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

Reply via email to