zf-fr / zfr-rest

A module for Zend Framework 2 that aims to simplify RESTful
81 stars 31 forks source link

retrieve and merge post parameters in ValidateIncomingData #195

Closed Orkin closed 9 years ago

Ocramius commented 9 years ago

The request content IS the POST data. What are you trying to solve here, exactly?

Orkin commented 9 years ago

When we upload a file the content of the request is multipart so we don't have a content and we need to retrieve data from $_POST

Ocramius commented 9 years ago

@Orkin what's the request content in that case (the output of getContent())?

Orkin commented 9 years ago

@Ocramius It's empty : var_dump => string(0) ""

Orkin commented 9 years ago

ping @Ocramius

bakura10 commented 9 years ago

From what I understand @Ocramius , @Orkin is using traditional form/www-multipart, hence it cannot be decoded using json_deocde.

I'm not against this change. It is a bit hacky but does the job for now.

Orkin commented 9 years ago

@bakura10 It's only when there is file uploading with some data ;)

bakura10 commented 9 years ago

I'm merging now. I can understand the problem that it solves and I don't see any problems that could be introduced. I don't have time nor the courage to find a better solution for now.

Ocramius commented 9 years ago

Opened #197 /cc @Orkin