Opened 9 years ago
Closed 9 years ago
#14375 closed Bug (fixed)
No progress bar, notifications in uploadwidget.
Reported by: | Tade0 | Owned by: | Tade0 |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.5.10 |
Component: | General | Version: | 4.5.6 |
Keywords: | Cc: |
Description
Steps to reproduce
- Open http://tests.ckeditor.dev:1030/tests/plugins/uploadwidget/manual/image
- Drag and drop an image from the file system.
Expected result
There should appear a progress bar, and after the upload is done a success notification should be displayed.
Actual result
There are no notifications and the image is "uploaded" almost immediately(no artificial delay - which should be present).
Other details (browser, OS, CKEditor version, installed plugins)
IE, Chrome, Firefox.
Bug appeared along with commit d691b1a152cae852f1165b78a46133f9875e7c44
.
Change History (12)
comment:1 Changed 9 years ago by
Status: | new → confirmed |
---|---|
Version: | → 4.5.6 |
comment:2 Changed 9 years ago by
Milestone: | CKEditor 4.5.8 → CKEditor 4.5.9 |
---|
comment:3 Changed 9 years ago by
Owner: | set to Tade0 |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 9 years ago by
comment:5 Changed 9 years ago by
Status: | assigned → review |
---|
Modified the mock so that now it detects the function signature(simply the number of arguments in this case).
Changes pushed to branch:t/14375.
comment:6 Changed 9 years ago by
Milestone: | CKEditor 4.5.9 → CKEditor 4.5.10 |
---|
comment:7 Changed 9 years ago by
Status: | review → review_failed |
---|
Indeed bug is cause by d691b1a152cae852f1165b78a46133f9875e7c44
where ckCsrfToken
was added to upload form. The additional request with ckCsrfToken
which is called after image request messes up total
and filename
variables in the mock.
While checking number of arguments works fine in this case:
- Adding another elements to the upload form (with 3 arguments) in the future may break this code again.
- It is not very clear solution, I have to see how file upload works to understand it.
While every field in the form has its own name which is visible in the requests arguments:
["upload", File, "car-8.jpg"] ["ckCsrfToken", "90BQ0iwVYaEqQ0GiZmrunbtQSS3dG5343L4l4Fm8"]
maybe detecting it using this name will be more reasonable solution?
I also added one commit fixing variable names conflict / overshadowing.
comment:8 Changed 9 years ago by
Status: | review_failed → review |
---|
Made it so. Rebased with master, changes pushed to branch:t/14375.
comment:9 Changed 9 years ago by
Wouldn't it be better to check for name == 'upload'
instead of name !== 'ckCsrfToken'
in this line? Adding another elements to the upload form (with 3 arguments) in the future will still break this test.
It's just a detail and I'm not sure if there will be any changes in this code in the future, what do you think @Tade0?
comment:11 Changed 9 years ago by
Status: | review → review_passed |
---|
Looks good, I only changed this line as mentioned in the comment above.
comment:12 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:e9562471947099ac9030e6c2c4258521388571e7.
The reason for this error is that the form data object mock that is used in the test does not support appending more than one item. I'll modify the mock accordingly.