public static function build(string $fullPath, int $uploadStatus, string $clientFileName = null, string $clientMimeType = null) : \Dms\Core\File\IUploadedFile
    {
        if ($clientMimeType && stripos($clientMimeType, 'image') === 0) {
            return new UploadedImage(
                    $fullPath,
                    $uploadStatus,
                    $clientFileName,
                    $clientMimeType
            );
        } else {
            return new UploadedFile(
                    $fullPath,
                    $uploadStatus,
                    $clientFileName,
                    $clientMimeType
            );
        }
    }
public static function build(string $fullPath, int $uploadStatus, string $clientFileName = null, string $clientMimeType = null) : \Dms\Core\File\IUploadedFile
    {
        if ($clientMimeType && stripos($clientMimeType, 'image') === 0) {
            return new UploadedImage(
                    $fullPath,
                    $uploadStatus,
                    $clientFileName,
                    $clientMimeType
            );
        } else {
            return new UploadedFile(
                    $fullPath,
                    $uploadStatus,
                    $clientFileName,
                    $clientMimeType
            );
        }
    }
public static function build ( string $ fullPath , int $ uploadStatus , string $ clientFileName = null , string $ clientMimeType = null ) : \ Dms \ Core \ File \ IUploadedFile { if ( $ clientMimeType && stripos ( $ clientMimeType , 'image' ) === 0 ) { return new UploadedImage ( $ fullPath , $ uploadStatus , $ clientFileName , $ clientMimeType ) ; } else { return new UploadedFile ( $ fullPath , $ uploadStatus , $ clientFileName , $ clientMimeType ) ; } }
Builds a new uploaded file instance based on the given mime type.

@param string      $fullPath
@param int         $uploadStatus
@param string|null $clientFileName
@param string|null $clientMimeType

@return IUploadedFile
Builds a new uploaded file instance based on the given mime type .