danth / transfer

Transfer files into Nextcloud from a URL
https://apps.nextcloud.com/apps/transfer
GNU Affero General Public License v3.0
28 stars 3 forks source link

Progress bars #4

Open danth opened 2 years ago

danth commented 2 years ago

Description

Display a progress bar for ongoing downloads.

Hopefully this can be implemented within the files app, showing the progress bar in the place where the file would appear if it already existed.

Use case

Provides live feedback to the user so that they know what is happening.

TtuxX commented 2 years ago

That's a great idea, as currently we do not have any sign of download status once the link has been sent to download in the background (and the download delay is pretty high?).

You could maybe use the same style as the Nextcloud Files upload progress bar ? Adding maybe the real-time download speed and the ETA instead of the text "quelques secondes" ("few seconds") ?

image
danth commented 2 years ago

Including the transfer speed will be useful, if it is possible to retrieve that information from the code which handles the download.

I thought the progress bar could be displayed within the file list, something like this (borrowed your image):

Transfer progress bar mockup

And appear for other users if the folder is shared, so that they can also view the progress and know that the file name is already used.

What do you think?

TtuxX commented 2 years ago

This is a great idea, I like your mockup a lot !! :)

To continue on your idea: regarding the icon (preview) of the file, given that it cannot be generated before download, you could maybe do one of these two things:

danth commented 2 years ago

I'd say a downloading icon is better. The icon could be still when the download is queued, and become animated when it is in progress.

devnoname120 commented 2 years ago

How is the status on this? :) This feature would be massively useful for me because I transfer ≈ 50 GB files.

danth commented 2 years ago

I don't have enough time to work on this right now, but I'd be happy to accept a pull request :)

z0rgster commented 1 year ago

I'd like to add one more aspect to this.

When the transfer dialog is submitted, a dummy file should be created immediately with a status like "Job waiting 04:20" where the time until the next cron job is shown live. When the download is running, the wait message would be replaced by the progress bar.

This would give users a little more feedback. When I start any process, I always like to know that the system is working on it and when I can expect a result. This could also be a first step towards solving #10.

danth commented 1 year ago

I agree a placeholder should appear as soon as a transfer is requested - and it should block creation of other files with the same name.

However I think simply saying "Queued" would be a more appropriate message. There could be several other transfers waiting to start in the same cron job - so the download would not necessarily begin at the predicted time.

danth commented 7 months ago

The new files list in Nextcloud 28 should make this a lot easier to implement, since at a glance it appears we can now add things to the list without having to resort to workarounds.

The following things need to be done to get it working:

Then we can work on showing extra information like progress bars and the position in the queue.


Pseudocode for the client side:

import { emit } from '@nextcloud/event-bus'
import { Entry } from '@nextcloud/files'

// Define new class inheriting from Entry
// https://nextcloud-libraries.github.io/nextcloud-files/interfaces/Entry.html

function whenFolderLoaded() {
  // Load list of transfers

  for (transfer in transfers) {
    // Construct our class with the data of the transfer
    emit('files:node:created', entry)
  }
}