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:
1 parent
943479f5f6
commit
804f61432d
2 files changed
+125
-16
No files matched your search
@@ -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