Open Sencillo  2015.107
Long live the simplicity of PHP
 All Data Structures Namespaces Functions Pages
upload Class Reference

Public Member Functions

 __construct ($path)
 
 mimeConfig ($mime=null)
 
 path ($path)
 
 maxSize ($size)
 
 advancedMode ($mode=null)
 
 ajaxSendJson ($respond=null)
 
 name ()
 
 upload ()
 

Protected Member Functions

 mimeTest ($mime)
 

Protected Attributes

 $mime
 
 $uploadDirectory
 
 $size
 
 $uploadInfo
 
 $mode
 
 $status
 

Detailed Description

Definition at line 11 of file files.upload.fup.php.

Member Function Documentation

advancedMode (   $mode = null)

Advanced upload mode TRUE/FALSE, deafult FALSE

Parameters
bool$mode

Definition at line 93 of file files.upload.fup.php.

ajaxSendJson (   $respond = null)
final

Json status encoder for AJAX comunication

Definition at line 109 of file files.upload.fup.php.

maxSize (   $size)

Maximum allowed file size

Parameters
int$size

Definition at line 83 of file files.upload.fup.php.

mimeConfig (   $mime = null)

Config method for legal mime types

Parameters
string$mime

default, if $mime is null

Definition at line 45 of file files.upload.fup.php.

mimeTest (   $mime)
protected

Internal protected function for detection legal mime type

Parameters
mixed$mime

Definition at line 32 of file files.upload.fup.php.

name ( )

Get new file name

Definition at line 124 of file files.upload.fup.php.

path (   $path)

specify upload directory ends with / (slash)

Parameters
string$path

Definition at line 73 of file files.upload.fup.php.

upload ( )

Upload method

200 - OK 404 - Not found / Unknown error / No file 413 - Request is to large (maximum size is low) 415-0 - Unsupported Media Type (acquired in upload method) 415-1 - Unsupported Media Type (acquired in mimeConfig method) 417 - Expectation Failed (failed moving file from temporary location) 444 - No Response / Internal AJAX fail

Definition at line 140 of file files.upload.fup.php.


The documentation for this class was generated from the following file: