src/MediaServices/MediaServicesRestProxy.php
public function uploadAssetFile(Locator $locator, $name, $file)
    {
        Validate::isString($name, 'name');
        Validate::notNull($file, 'file');

        $urlFile = $locator->getBaseUri().'/'.$name;
        $url = $urlFile.$locator->getContentAccessComponent();

        if (is_resource($file)) {
            $this->_uploadAssetFileFromResource($url, $file);
        } else {
            $this->_uploadAssetFileFromString($url, $file);
        }
    }
public function uploadAssetFile(Locator $locator, $name, $file)
    {
        Validate::isString($name, 'name');
        Validate::notNull($file, 'file');

        $urlFile = $locator->getBaseUri().'/'.$name;
        $url = $urlFile.$locator->getContentAccessComponent();

        if (is_resource($file)) {
            $this->_uploadAssetFileFromResource($url, $file);
        } else {
            $this->_uploadAssetFileFromString($url, $file);
        }
    }
public function uploadAssetFile ( Locator $ locator , $ name , $ file ) { Validate :: isString ( $ name , 'name' ) ; Validate :: notNull ( $ file , 'file' ) ; $ urlFile = $ locator -> getBaseUri ( ) . '/' . $ name ; $ url = $ urlFile . $ locator -> getContentAccessComponent ( ) ; if ( is_resource ( $ file ) ) { $ this -> _uploadAssetFileFromResource ( $ url , $ file ) ; } else { $ this -> _uploadAssetFileFromString ( $ url , $ file ) ; } }
Upload asset file to storage.

@param Locator           $locator Write locator for file upload
@param string            $name    Uploading filename
@param string | resource $file    Uploading content or file handle
Upload asset file to storage .