Skip to content
New issue

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

Files only show up in the list once completely uploaded #4965

Closed
jancborchardt opened this issue Sep 24, 2013 · 9 comments
Closed

Files only show up in the list once completely uploaded #4965

jancborchardt opened this issue Sep 24, 2013 · 9 comments

Comments

@jancborchardt
Copy link
Member

Regression in current master: Files only show up in the list once they are completely uploaded. No placeholder with spinner as there used to be.

@georgehrke @PVince81 maybe something to do with the previews or the Ajax stuff?

@DeepDiver1975
Copy link
Member

This is most probably related to the file conflict dialog from @butonic - because we is on vacation we need to find somebody else to jump in. @karlitschek

@PVince81
Copy link
Contributor

PVince81 commented Oct 1, 2013

I'll have a look at this.

@PVince81
Copy link
Contributor

PVince81 commented Oct 1, 2013

The code for this has been moved from "fileuploadadd" to "fileuploaddone", which means that the file is intentionally added into the list once the upload is done.

I will try to add back the entry with the spinner.

@PVince81
Copy link
Contributor

PVince81 commented Oct 1, 2013

The spinner seems to have been intentionally removed by @butonic when implementing the file conflict dialog.
See this code comment 8828faf#diff-9112ab761e9b96bef644fc2c1f6e35c1R44 from #4766

I'll continue looking into adding it back. It's not a quick fix as much of the upload code has been refactored.

I'll try and implement the following behavior:

  1. User selects file for upload
  2. Spinner + file name is inserted into the file list with the uploaded file name (regardless whether the file already exists in the list)
  3. If a conflict occurs
    a. Spinner + file name disappear from the list
    b. Conflict dialog appears
    c. If user cancels, do nothing.
    d. If user wants to keep old file, do nothing.
    e. If user wants to overwrite file, spinner + file name reappear in the list
  4. After upload completed: spinner + file name entry are replaced by the actual file data.

@PVince81
Copy link
Contributor

PVince81 commented Oct 1, 2013

Ok I've pushed a partial fix to 4965-bringbackfileuploadspinner (branched from master)

It does display the spinner but the spinner doesn't reappear whenever the user chose to overwrite a file.
Also, after uploading a file, it's not possible to delete it. The code in "OC.Upload.cancelUpload()" doesn't work and was deprecated.

@butonic
Copy link
Member

butonic commented Oct 15, 2013

Yes, I intentionally removed the upload in progress spinner because it increases the complexity of the file upload handling to a level that I could not wrap my head around while adding a conflicts dialog.

It starts getting complicated when trying to cancel uploads because you have to keep track of the xhr upload objects that currently exist. And users can add more files while uploads are in progress.

@jancborchardt an me also wanted to replace the upload spinner with a progress bar in the background of the table row. @VicDeo while you are fixing this maybe we should add a placeholder row to the table spanning all columns (while files are being uploaded they don't need size and modified date). We can then use the background of a div to render the upload progress. (IE8 should use an animated gif to indicate upload is in progress)

@PVince81
Copy link
Contributor

@butonic I agree with you. Couldn't wrap my head around that logic either 😉

How about putting a spinner near the progress bar in the controls bar as an alternative ?
Currently there is no spinner displayed at all and the progress bar sometimes moves slowly which leads to the impression that nothing is happening.

@butonic
Copy link
Member

butonic commented Oct 15, 2013

@PVince81 yes that would work. I'll only be able to get my hands on this next week.

@butonic
Copy link
Member

butonic commented Oct 21, 2013

File upload progress bar for individual Files tracked in #991

@butonic butonic closed this as completed Oct 21, 2013
@lock lock bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants