OneupUploaderBundle
OneupUploaderBundle copied to clipboard
Return custom data to the Frontend
Bug Report
Q | A |
---|---|
BC Break | yes |
Version | 2.2 |
Summary
The documentation https://github.com/1up-lab/OneupUploaderBundle/blob/master/doc/response.md says that it is possible to send a response to the frontend. But that does not work at all.
I use Dropbox on the frontend.
How to reproduce
Just try to do the following in an Event-Listener:
$response = $event->getResponse();
$response["id"] = 12;
return $response;
I looked into the Code and there is no way that it can work..
https://github.com/1up-lab/OneupUploaderBundle/blob/8bd74b2d5f07f9ee6280f0b90ed8199471f57f52/Controller/DropzoneController.php#L39
It always returns the previously created EmptyResponse object.
How to solve
That bug could be solved by using references or reassigning the response variable with the return value of the handleChunkendUpload and handleUpload methods..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.