Jinya CMS

FileUploadService extends StorageBaseService
in package

A simple helper to handle file uploads

Tags

Table of Contents

BASE_PATH  = __ROOT__
PUBLIC_PATH  = self::BASE_PATH . '/public/'
SAVE_PATH  = self::BASE_PATH . '/public/' . self::WEB_PATH
WEB_PATH  = '/jinya-content/'
$conversionService  : ConversionService
$logger  : LoggerInterface
__construct()  : mixed
clearChunks()  : void
Removes all chunks for the given file
finishUpload()  : null|object
Finishes the upload for the given file
saveChunk()  : UploadingFileChunk
Saves a new file chunk and returns it
getFileHash()  : string
Hashes the given resources content

Constants

SAVE_PATH

public string SAVE_PATH = self::BASE_PATH . '/public/' . self::WEB_PATH

The full base path for stored files

Tags

WEB_PATH

public string WEB_PATH = '/jinya-content/'

The base path for web data

Tags

Properties

Methods

clearChunks()

Removes all chunks for the given file

public clearChunks(int $fileId) : void
Parameters
$fileId : int
Tags
throws
Exception
Return values
void

finishUpload()

Finishes the upload for the given file

public finishUpload(int $fileId) : null|object
Parameters
$fileId : int
Tags
throws
EmptyResultException
throws
NotNullViolationException
throws
Exception
Return values
null|object

getFileHash()

Hashes the given resources content

protected getFileHash(resource $fileContent) : string
Parameters
$fileContent : resource
Tags
Return values
string

Search results