Im working with a friend to recieve image uploads from his C# program to my php script. Hes sending the form data and image as an HTTP POST method.
The text comes through fine, but when the image comes through, it doesnt show up in $_FILES, but in $_POST.
when i print_r $_POST and he submits, he gets this…
Array
(
[dbto] => sometext
[blurb] => somemoretext
Content-Disposition: file; name="userfile"; filename="picture.png"
Content-Type: IMAGE/PNG
?PNG
Then his app crashes. I read something about a possible bug in php when handling this kind of transaction, something about the way the data is being sent.
Any ideas if this is a known issue or something i can do on my side?
if the sender can’t encode it properly, then you can receive it by opening and reading ‘php://input’:
(if the POST is encoded though, this won’t work)