Response should be more flexible
Additional parameters in the response should be handled. Default fileUploadResponse
handler should pass all additional JSON data to the data
. So for example response with height
and width
parameters:
{
"uploaded": 1,
"fileName": "foo.jpg",
"url": "/files/foo.jpg",
"height: 90,
"width": 160
}
Should set evt.data.width = 160
and evt.data.height = 90
.
Change History (8)
Summary: |
Response should be more flexible. →
Response should be more flexible
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Milestone: |
→ CKEditor 4.6.0
|
Version: |
→ 4.5.0
|
Owner: |
set to Tomasz Jakut
|
Status: |
confirmed →
assigned
|
Status: |
assigned →
review
|
Resolution: |
→ fixed
|
Status: |
review →
closed
|
I don't really know if my solution is elegant enough, but I noticed that the response parsed by default
fileUploadResponse
handler is passed back to theFileLoader
instance and widgets have access only to it (viaonUploaded
callback) - so I thought that the response could be also attached to theFileLoader
- andresponse
property sounds most sane to me.So widgets can get additional data from response using something like this: