implements Phalcon\Http\Request\FileInterface
Provides OO wrappers to the $_FILES superglobal
use Phalcon\Mvc\Controller; class PostsController extends Controller { public function uploadAction() { // Check if the user has uploaded files if ($this->request->hasFiles() == true) { // Print the real file names and their sizes foreach ($this->request->getUploadedFiles() as $file) { echo $file->getName(), " ", $file->getSize(), "\n"; } } } }
Phalcon\Http\Request\File constructor
Returns the file size of the uploaded file
Returns the real name of the uploaded file
Returns the temporary name of the uploaded file
Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead
Gets the real mime type of the upload file using finfo
Checks whether the file has been uploaded via Post.
Moves the temporary file to a destination within the application
© 2011–2017 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/latest/api/Phalcon_Http_Request_File.html