Skip to content

refreshFoldersAndItems firing too soon during upload #452

@appdezign

Description

@appdezign

I have been testing with both TinyMCE and CKEditor, but the results are the same. When I am uploading a small image, the list is refreshed in the background as it should. But when I am uploading a very large image, I can see the list refreshing in the background, while the file is still uploading! The result is that, when I close the modal, the uploaded file is NOT shown in the list. I have to refresh the list by clicking on thumbnails, list, or sort to actually see the new file(s).

When I check the code that is responsible for the refreshing, I can see that 'refreshFoldersAndItems' is fired on the Dropzone 'addedfile' event:

views/index.blade.php - line 201
this.on("addedfile", function(file) { refreshFoldersAndItems('OK'); });

The Dropzone docs are not very clear about the 'addedfile' event, but from what I've seen, I think 'refreshFoldersAndItems' should be fired on 'success' or on 'complete'.

I have tested this extensively, and it seems to solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBehaviors that do not meet expectation.doneIssue is fixed. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions