OneupUploaderBundle icon indicating copy to clipboard operation
OneupUploaderBundle copied to clipboard

Return custom data to the Frontend

Open Timu57 opened this issue 3 years ago • 1 comments

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..

Timu57 avatar Mar 14 '21 17:03 Timu57

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.

stale[bot] avatar May 16 '21 18:05 stale[bot]