jenssegers / php-proxy

A PHP proxy script with https and post support
https://jenssegers.com
933 stars 266 forks source link

upload file proxy invalid #81

Open wuxue107 opened 4 years ago

wuxue107 commented 4 years ago

http://xxxx/aaa $request = ServerRequestFactory::fromGlobals(); $guzzle = new \GuzzleHttp\Client(); $proxy = new Proxy(new GuzzleAdapter($guzzle)); $response = $proxy->forward($request)->to('http://yyyy');

action code in http://yyyy/aaa var_dump($_GET,$_FILES);

curl -F "media=@a.png" "http://xxxx/aaa?type=image" result:
array(1) { ["type"]=> string(5) "image" } array(0) { }

vukasin-nikodijevic commented 4 years ago

I have exactly the same issue - seems to be issue with the library. I've been reported from the backend api that file key is missing in the form data and for sure it is sent to proxy.

wuxue107 commented 4 years ago

I have exactly the same issue - seems to be issue with the library. I've been reported from the backend api that file key is missing in the form data and for sure it is sent to proxy.

an interim settlement