We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to send file?

i use Phalcon\Http\Client\Reques but i dont know how send file with post method.

CURLFile not work (

edited Jul '16

Here is the api documentaiton for request files.

in your controller.

if($this->request->hasFiles()){
    $files = $this->request->getUploadedFiles();
}

or are oyu trying to send a file to the browser IE download?

https://forum.phalcon.io/discussion/196/file-downloads

This is a discussion form a long time ago on downloads.

Phalcon doesn't have any download classes because backends for file transfer are always very different, + i would advise storing your files elsewhere than your app server IE amazon works great. keeps load off your app server.