We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using Directory sharing via link
I need a button to download them all
It will enhanceuser's user experience
When sharing a directoty with 1000 files using web link mode
I have to click one by one to download
It is better to have a button to download them all
No response
The text was updated successfully, but these errors were encountered:
async function download_one(fileurl, file_name) { console.log("downloading " + file_name); fetch(fileurl).then((res) => res.blob().then((blob) => { var a = document.createElement('a'); var url = window.URL.createObjectURL(blob); a.href = url; a.download = file_name; // 下载名称 a.click(); window.URL.revokeObjectURL(url); }) ); } async function download_all() { document.getElementById('status-text').innerText = i18n.waiting; const response = await fetch( `${BASE_URL}/prepare-download?sessionId=${sessionId}`, { method: 'POST', }, ); if (response.status === 403) { document.getElementById('status-text').innerText = i18n.rejected; return; } else if (response.status !== 200) { document.getElementById('status-text').innerText = `Error: ${response.status}`; return; } const data = await response.json(); const files = data.files; sessionId = data.sessionId; sessionStorage.setItem('sessionId', sessionId); //ui var button = document.createElement("button"); button.type = "button"; button.textContent = "download all"; button.onclick = function() { file_num = Object.keys(files).length; console.log("file number:" + file_num); for (let i = 0; i < file_num; i++) { const file = files[Object.keys(files)[i]]; const index = file.fileName.lastIndexOf("/"); var file_name = file.fileName.substring(index+1, file.fileName.length); var file_dir = file.fileName.substring(0, index+1); const fileurl = "api/localsend/v2/download?" + "sessionId=" + sessionId + "&fileId=" + file.id; download_one(fileurl, file_name); } } ;
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe.
When using Directory sharing via link
I need a button to download them all
It will enhanceuser's user experience
Describe the solution you'd like
Directory sharing with web link mode
When sharing a directoty with 1000 files using web link mode
I have to click one by one to download
It is better to have a button to download them all
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: