-
Notifications
You must be signed in to change notification settings - Fork 34
functions_modules_uploads_wdffilemodel.trait
Definition: protected function getFolderArchive()
Returns: NOT DOCUMENTED
IMPLEMENTS Model::GetTableName
Deletes this from DB and disk.
Definition: public function Delete()
Returns: bool
True on success, false on failure.
Definition: protected function processFile($filename, $name=false, $mime=false, $removesourcefile=true, $extra_columns)
Returns: NOT DOCUMENTED
Parameters:
-
$filename
NOT DOCUMENTED -
$name [default: false]
NOT DOCUMENTED -
$mime [default: false]
NOT DOCUMENTED -
$removesourcefile [default: true]
NOT DOCUMENTED -
$extra_columns
NOT DOCUMENTED
Creates a new model from an uploaded file.
Definition: public static function ProcessUpload($file, $forced_mime=false, $extra_columns)
Returns: static
Parameters:
-
mixed $file
The $_FILES entry -
mixed $forced_mime
Optionally set a mimetype -
mixed $extra_columns
Currently unused
Processes the complete $_FILES array.
Definition: public static function ProcessUploads($forced_mime=false, $extra_columns)
Returns: array
Array of model instances
Parameters:
-
mixed $forced_mime
Optionally set a mimetype -
mixed $extra_columns
Currently unused
Checks if this is an image.
Definition: public function IsImage($mime=false)
Returns: bool
True if this is an image, false otherwise.
Parameters:
-
mixed $mime
If given, the given value will be checked instead of $this->mime.
Checks if this is a video.
Definition: public function IsVideo($mime=false)
Returns: bool
True if this is a video, false otherwise.
Parameters:
-
mixed $mime
If given, the given value will be checked instead of $this->mime.
Checks if this is an audio.
Definition: public function IsAudio($mime=false)
Returns: bool
True if this is an audio, false otherwise.
Parameters:
-
mixed $mime
If given, the given value will be checked instead of $this->mime.
Returns the full path on disk.
Definition: public function GetFullPath()
Returns: string
Full path on disk.
Checks if the file exists on disk.
Definition: public function Exists()
Returns: bool
True if the file exists on disk, false otherwise.
SHORTCUT static::FormatSize($this->size)
Returns a human readable string representation of a file size.
Definition: public static function FormatSize($size)
Returns: string
Human readable string representation the given size.
Parameters:
-
int $size
Size in bytes.
Passed the files contents to the requesting browser. Valid headers will be genrerated too.
Definition: public function PassToBrowser($asattachment=true)
Returns: void
Parameters:
-
mixed $asattachment
If true, the file will be sent as an attachment (Content-Disposition).
Returns the files contents.
Definition: public function getContent()
Returns: mixed
Contents of the file or NULL