File is being uploaded twice
When someone uses the browser to upload a file which already exists the file is being uploaded and a dialog pops up to ask what to do. If the user chooses to overwrite the file, it is uploaded again (upload file -> ask user -> upload file). This can be annoying when dealing with big files or a slow internet connection.
A few information about the server: Debian ownCloud 6.0.3 PHP Version 5.4.4-14+deb7u9 Apache 2.2.22
Hmm, I didn't realize that files were uploaded again. CC @butonic Not sure how to fix it though, maybe need to keep a copy of the pending file in temporary storage on the server. Trouble is that if the user doesn't do anything (keeping the dialog), the file could stay there forever.
Is it possible to get the file list before they are uploaded?
When the files are stored somewhere temporarily I would use a timeout to delete them after some time (maybe make it configurable).
It might be possible to only send the file list to upload first, then let the server check for existence, and only then upload the real ones. It would probably only work with modern browsers that use the FileReader API, as it gives the JS code a chance to get the file metadata before uploading. Other browser like IE8/9 (10?) only support direct upload and do not give access to the file.
Also, care needs to be taken when uploading folders (which only works on Chrome, new feature in OC 7).
As for the alternative of keeping temp files with a timeout, there is always the risk of filling up the server's temp cache when having many users.
@PVince81 When I first prepared the copy conflict dialog I also added a place where we can check if any of the files to upload are already present in the current filelist (as shown in the browser). see https://github.com/owncloud/core/blob/master/apps/files/js/file-upload.js#L178
I also experienced this. Is there some way to prevent this. It's just annoying to upload 10 files and wait. Then the dialog pops up and the upload begins again.
The commented code in https://github.com/owncloud/core/blob/master/apps/files/js/file-upload.js#L178 needs to implement what can be seen in http://youtu.be/4zbY6vr4DK4?t=2m19s
need to be addresses in 8.2
@DeepDiver1975 how will it be fixed ? I'm not aware of any good solution yet.
we will overhault that dialog handling as soon as we move to webdav. We basically can perform the conflict resolution on the client side by getting meta information about the existing file using PROPFIND
@CaptionF please note your issue is now being tracked here... looks like this is 8.2 please advise as to priority against your user expectations
@CaptionF please note your issue is now being tracked here... looks like this is 8.2 please advise as to priority against your user expectations
The problem with this ticket is, that there is no really way to bring this into older versions. :(
I guess we could still do https://github.com/owncloud/core/issues/8664#issuecomment-44663643 as a quickfix...
@cmonteroluque this has been communicated as been fixed with 8.2 and we should stick to this.
The only case where it will still have to reupload is when someone is concurrently uploading the same file into the folder, thus creating a duplicate before the list has been refreshed. The latter is a more rare case.
The most common case is when the file is already in the list, visible, and someone (sometimes deliberately) overwrites existing files. This can be covered by uncommenting and finishing https://github.com/owncloud/core/issues/8664#issuecomment-44663643 and should do short term.
@CaptionF is the exception listed by @PVince81 acceptable? @PVince81 would you finish this one?
Fix is here: https://github.com/owncloud/core/pull/19417
Note: the fix only pre-checks the currently visible list before attempting to upload files.
@PVince81 Thanks. @MorrisJobke please ensure, it gets reviewed and included in 8.2. Thanks a lot!
@PVince81 Thanks. @MorrisJobke please ensure, it gets reviewed and included in 8.2. Thanks a lot!
Already in.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.