Class HttpUploadedFile (namespace Nette\Web)


Provides access to individual files that have been uploaded by a client.

Object
   |
   --HttpUploadedFile
Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Web/HttpUploadedFile.php (line 30)
Public Method Summary
HttpUploadedFile
__construct ($value)
string
Returns the MIME content type of an uploaded file.
int
Image
Returns the image.
array
Returns the dimensions of an uploaded image as array.
string
getName ()
Returns the file name.
int
getSize ()
Returns the size of an uploaded file.
string
Returns the path to an uploaded file.
bool
isImage ()
Is uploaded file GIF, PNG or JPEG?
bool
isOk ()
Is there any error?
HttpUploadedFile
move (string $dest)
Move uploaded file to new location.
string
Returns the path to an uploaded file.
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()

Method Details

line 49

__construct

public HttpUploadedFile __construct ($value)

Input
$value
Output
HttpUploadedFile  

line 80

getContentType

public string getContentType ()

Returns the MIME content type of an uploaded file.

Output
string  

line 140

getError

public int getError ()

Returns the error code. http://php.net/manual/en/features.file-upload.errors.php

Output
int  

line 195

getImage

public Image getImage ()

Returns the image.

Output
Image  

line 206

getImageSize

public array getImageSize ()

Returns the dimensions of an uploaded image as array.

Output
array  

line 69

getName

public string getName ()

Returns the file name.

Output
string  

line 107

getSize

public int getSize ()

Returns the size of an uploaded file.

Output
int  

line 118

getTemporaryFile

public string getTemporaryFile ()

Returns the path to an uploaded file.

Output
string  

line 184

isImage

public bool isImage ()

Is uploaded file GIF, PNG or JPEG?

Output
bool  

line 151

isOk

public bool isOk ()

Is there any error?

Output
bool  

line 163

move

public HttpUploadedFile move (string $dest)

Move uploaded file to new location.

Input
string $dest
Output
HttpUploadedFile provides a fluent interface

line 129

__toString

public string __toString ()

Returns the path to an uploaded file.

Output
string