Huygens Remote Manager
  • Namespace
  • Class
  • Tree
  • Todo

Namespaces

  • hrm
    • job
    • param
      • base
    • setting
      • base
    • shell
    • stats
    • user
      • proxy

Classes

  • DatabaseConnection
  • Fileserver
  • FileserverV2
  • HuygensTemplate
  • HuygensTools
  • Log
  • Mail
  • Nav
  • OmeroConnection
  • QueueManager
  • System
  • Util
  • UtilV2
  • Validator

Functions

  • fileButton

Class UtilV2

Static class with some commodity functionality (version 2).

Namespace: hrm
Located at UtilV2.php

Methods summary

public static string
# getRelativePathToFileUploader( )

Return the relative path to the file uploader.

Return the relative path to the file uploader.

Returns

string
relative path.
public static integer
# getNumberConcurrentUploads( )

Report maximum upload size, in bytes, for concurrent upload.

Report maximum upload size, in bytes, for concurrent upload.

Returns

integer
maximum upload size in bytes.
public static integer
# getMaxConcurrentUploadSize( integer $nConcurrentUploads = 4 )

Report maximum upload size, in bytes, for concurrent uploads.

Report maximum upload size, in bytes, for concurrent uploads.

The maximum (chunk) concurrent upload file is calculated as a function of the max post size (from php.ini) and the configured number of concurrent uploads. To avoid choking the server when several users are uploading at the same size, the upload size is capped to 16MB.

Additionally, if the variable $max_post_limit is > 0, this will also be used. However, if both are set, the smallest will be returned (i.e. 16MB is a hard cap).

Parameters

$nConcurrentUploads

Maximum number of concurrent uploads (optional, default is 4).

Returns

integer
maximum upload size in bytes.
public static integer
# let_to_num( string $v )

This function transforms the php.ini notation for memory amount to an integer number of bytes.

This function transforms the php.ini notation for memory amount to an integer number of bytes.

Parameters

$v
Memory amount in php.ini notation

Returns

integer
Integer version in bytes

Example

'2M' -> 2 x 1024 x 1024 = 2,097,152
public static integer
# getMaxUploadFileSize( )

Report maximum file size that can be uploaded, in bytes.

Report maximum file size that can be uploaded, in bytes.

The value is defined by 'upload_max_filesize' from php.ini and (optionally) from the variable $max_upload_limit from the configuration files, if it is > 0. If both are set, 'upload_max_filesize' from the configuration files will be returned.

Returns

integer
Maximum file size that can be uploaded in bytes.

Todo

Does the php.ini value play a role in the chunk uploader (i.e., does it apply to the file chunk size)?


public static integer
# getMaxPostSize( )

Report maximum post size, in bytes.

Report maximum post size, in bytes.

The value is defined by 'post_max_size' from php.ini and (optionally) from the variable $max_post_limit from the configuration files, if it is > 0. If both are set, the smallest will be returned.

Returns

integer
Maximum upload post in bytes.
public static integer
# getMaxSingleUploadSize( )

Report maximum upload size, in bytes.

Report maximum upload size, in bytes.

Returns

integer
Maximum upload size in bytes.
Huygens Remote Manager API documentation generated by ApiGen