Skip to content

Return custom data to the Frontend #403

@Timu57

Description

@Timu57

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

return $this->createSupportedJsonResponse($response->assemble(), $statusCode);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions