protected function convertUploadParamsToHeaders($body = null, array $params = [], $verifyChecksum = true)
    {
        $headers = [];

        if ($verifyChecksum) {
            $headers['ETag'] = md5($body);
        }

        $availableParams = [
            'contentType' => 'Content-Type',
            'contentDisposition' => 'Content-Disposition',
            'deleteAfter' => 'X-Delete-After',
            'deleteAt' => 'X-Delete-At',
        ];

        foreach ($availableParams as $key => $header) {
            if (isset($params[$key])) {
                $headers[$header] = $params[$key];
            }
        }

        return $headers;
    }
protected function convertUploadParamsToHeaders($body = null, array $params = [], $verifyChecksum = true)
    {
        $headers = [];

        if ($verifyChecksum) {
            $headers['ETag'] = md5($body);
        }

        $availableParams = [
            'contentType' => 'Content-Type',
            'contentDisposition' => 'Content-Disposition',
            'deleteAfter' => 'X-Delete-After',
            'deleteAt' => 'X-Delete-At',
        ];

        foreach ($availableParams as $key => $header) {
            if (isset($params[$key])) {
                $headers[$header] = $params[$key];
            }
        }

        return $headers;
    }
protected function convertUploadParamsToHeaders ( $ body = null , array $ params = [ ] , $ verifyChecksum = true ) { $ headers = [ ] ; if ( $ verifyChecksum ) { $ headers [ 'ETag' ] = md5 ( $ body ) ; } $ availableParams = [ 'contentType' => 'Content-Type' , 'contentDisposition' => 'Content-Disposition' , 'deleteAfter' => 'X-Delete-After' , 'deleteAt' => 'X-Delete-At' , ] ; foreach ( $ availableParams as $ key => $ header ) { if ( isset ( $ params [ $ key ] ) ) { $ headers [ $ header ] = $ params [ $ key ] ; } } return $ headers ; }
Parses upload parameters and assigns them to appropriate HTTP headers.

@param string|resource $body           = null
@param array           $params         = []
@param bool            $verifyChecksum = true

@return array
Parses upload parameters and assigns them to appropriate HTTP headers .