OpusCapita / filemanager

React based FileManager for browser ( + FS REST API for Node.js and Express)

Home Page:https://demo.core.dev.opuscapita.com/filemanager/master/?currentComponentName=FileManager&maxContainerWidth=100%25&showSidebar=false

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progress notifications on file download

SpringsTea opened this issue · comments

I have been using the node file connector for my implementation. I am confused how downloading one file, and downloading multiple folders differ greatly. When one file is requested, getResourceById is used, and when multiple files are requests, downloadResources is used.

Thats all fine, but how they are called are vastly different. Both downloadResources and uploadFileToId are called through a capabilities handler, and have onProgress passed as a parameter, so operation progress can be displayed. But single file download doesn't have this, it just gets the resource id, and makes the file request without the involvement of any capabilities.

Basically, I'm just trying to get the progress notifications to appear the way it does when you download a multiple file zip. capabilities/download.js has code to handle downloading a single resource, but it's never used as far as I can tell, since single file downloading falls back on api.js

Browsers show the download progress for a single file anyway. This is their standard functionality.

For a collection of files, we don't show the download progress. We show archiving progress because the browser does not know how to make it. After this, the browser shows the download progress.