api2/admin/datastore/pxar_file_download: download directory as zip
by using the new ZipEncoder and recursively add files to it the zip only contains directories, normal files and hardlinks (by simply copying the content), no symlinks, etc. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
943479f5f6
commit
804f61432d
@ -87,6 +87,9 @@ Ext.define("PBS.window.FileBrowser", {
|
||||
};
|
||||
params.filepath = data.filepath;
|
||||
atag.download = data.text;
|
||||
if (data.type === 'd') {
|
||||
atag.download += ".zip";
|
||||
}
|
||||
atag.href = me
|
||||
.buildUrl(`/api2/json/admin/datastore/${view.datastore}/pxar-file-download`, params);
|
||||
atag.click();
|
||||
@ -106,6 +109,11 @@ Ext.define("PBS.window.FileBrowser", {
|
||||
case 'f':
|
||||
canDownload = true;
|
||||
break;
|
||||
case 'd':
|
||||
if (data.depth > 1) {
|
||||
canDownload = true;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user