public static function upload($fileRoute, $options = NULL) {
    // Check if there are any options passed.
    if (is_null($options)) {
      $options = Image::$defaultUploadOptions;
    } else {
      $options = array_merge(Image::$defaultUploadOptions, $options);
    }

    // Upload image.
    return DiskManagement::upload($fileRoute, $options);
  }
public static function upload($fileRoute, $options = NULL) {
    // Check if there are any options passed.
    if (is_null($options)) {
      $options = Image::$defaultUploadOptions;
    } else {
      $options = array_merge(Image::$defaultUploadOptions, $options);
    }

    // Upload image.
    return DiskManagement::upload($fileRoute, $options);
  }
public static function upload ( $ fileRoute , $ options = NULL ) { // Check if there are any options passed. if ( is_null ( $ options ) ) { $ options = Image :: $ defaultUploadOptions ; } else { $ options = array_merge ( Image :: $ defaultUploadOptions , $ options ) ; } // Upload image. return DiskManagement :: upload ( $ fileRoute , $ options ) ; }
Image upload to disk.

@param fileRoute string
@param options [optional]
(
fieldname => string
validation => array OR function
resize: => array
)
@return {link: 'linkPath'} or error string
Image upload to disk .