Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

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

Interfaces

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

Class FileUpload

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

Nette\Http\FileUpload uses Nette\SmartObject
Namespace: Nette\Http
Located at Http/FileUpload.php
Methods summary
public
# __construct( $value )
public string
# getName( )

Returns the file name.

Returns the file name.

Returns

string
string
public string
# getSanitizedName( )

Returns the sanitized file name.

Returns the sanitized file name.

Returns

string
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
string|null
public integer
# getSize( )

Returns the size of an uploaded file.

Returns the size of an uploaded file.

Returns

integer
int
public string
# getTemporaryFile( )

Returns the path to an uploaded file.

Returns the path to an uploaded file.

Returns

string
string
public string
# __toString( )

Returns the path to an uploaded file.

Returns the path to an uploaded file.

Returns

string
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
int
public boolean
# isOk( )

Is there any error?

Is there any error?

Returns

boolean
bool
public boolean
# hasFile( )

Returns

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

Move uploaded file to new location.

Move uploaded file to new location.

Parameters

$dest

Returns

Nette\Http\FileUpload
static
public boolean
# isImage( )

Is uploaded file GIF, PNG or JPEG?

Is uploaded file GIF, PNG or JPEG?

Returns

boolean
bool
public Nette\Utils\Image
# toImage( )

Returns the image.

Returns the image.

Returns

Nette\Utils\Image
Nette\Utils\Image

Throws

Nette\Utils\ImageException
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
array|null
public string|null
# getContents( )

Get file contents.

Get file contents.

Returns

string|null
string|null
Methods used from Nette\SmartObject
__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 string|null $contents
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0