anlutro / php-curl

Simple PHP curl wrapper class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symfony2 file upload

linfiesto opened this issue · comments

How do I upload a file which is a symfony2 file object from my upload form to a web service using your library?

I imagine you'd just use a CURLFile - you should be able to follow the examples, just replace curl_setopt with $request->setOption.

Thanks. I solved the problem using the newRawRequest function and adding the curlfile array to the third parameter.