Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Diagnostics
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
      • Diagnostics
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • PhpGenerator
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
  • NetteModule
  • none

Classes

  • Context
  • FileUpload
  • Helpers
  • Request
  • RequestFactory
  • Response
  • Session
  • SessionSection
  • Url
  • UrlScript
  • UserStorage

Interfaces

  • IRequest
  • IResponse
  • ISessionStorage
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class FileUpload

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

Nette\Object
Extended by Nette\Http\FileUpload
Namespace: Nette\Http
Author: David Grudl
Located at Http/FileUpload.php
Methods summary
public
# __construct( $value )
public string
# getName( )

Returns the file name.

Returns the file name.

Returns

string
public string
# getSanitizedName( )

Returns the sanitized file name.

Returns the sanitized file name.

Returns

string
public string|null
# getContentType( )

Returns the MIME content type of an uploaded file.

Returns the MIME content type of an uploaded file.

Returns

string|null
public integer
# getSize( )

Returns the size of an uploaded file.

Returns the size of an uploaded file.

Returns

integer
public string
# getTemporaryFile( )

Returns the path to an uploaded file.

Returns the path to an uploaded file.

Returns

string
public string
# __toString( )

Returns the path to an uploaded file.

Returns the path to an uploaded file.

Returns

string
public integer
# getError( )

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

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

Returns

integer
public boolean
# isOk( )

Is there any error?

Is there any error?

Returns

boolean
public Nette\Http\FileUpload
# move( string $dest )

Move uploaded file to new location.

Move uploaded file to new location.

Parameters

$dest
string

Returns

Nette\Http\FileUpload
public boolean
# isImage( )

Is uploaded file GIF, PNG or JPEG?

Is uploaded file GIF, PNG or JPEG?

Returns

boolean
public Nette\Image
# toImage( )

Returns the image.

Returns the image.

Returns

Nette\Image

Throws

Nette\Utils\ImageException
public array|null
# getImageSize( )

Returns the dimensions of an uploaded image as array.

Returns the dimensions of an uploaded image as array.

Returns

array|null
public string|null
# getContents( )

Get file contents.

Get file contents.

Returns

string|null
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Magic properties summary
public read-only string $name
#
public read-only string $sanitizedName
#
public read-only string|null $contentType
#
public read-only integer $size
#
public read-only string $temporaryFile
#
public read-only integer $error
#
public read-only boolean $ok
#
public read-only boolean $image
#
public read-only array|null $imageSize
#
public read-only string|null $contents
#
Magic properties inherited from Nette\Object
$reflection
Nette 2.1 API documentation generated by ApiGen 2.8.0