MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / onClickDownloadDirectory

Function onClickDownloadDirectory

public/components/files/MainFiles.js:368–376  ·  view source on GitHub ↗
(parentPath, name)

Source from the content-addressed store, hash-verified

366 moveDirectoryOrFileModal.value = null;
367 }
368 function onClickDownloadDirectory(parentPath, name) {
369 const downloadUrl = `/api/files/download-directory?parentPath=${encodeURIComponent(parentPath)}&name=${encodeURIComponent(name)}`;
370 const link = document.createElement('a');
371 link.href = downloadUrl;
372 link.download = `${name}.zip`;
373 document.body.appendChild(link);
374 link.click();
375 document.body.removeChild(link);
376 }
377 async function onClickDeleteDirectory(parentPath, name, isBulkDeleting = false) {
378 if (isBulkDeleting || confirm('Are you sure you want to delete this directory?')) {
379 if (!isBulkDeleting && isDeleting.value) {

Callers 1

ListFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected