src/Tus/Server.php
protected function verifyPatchRequest(array $meta) : int
    {
        if (self::UPLOAD_TYPE_FINAL === $meta['upload_type']) {
            return HttpResponse::HTTP_FORBIDDEN;
        }

        $uploadOffset = $this->request->header('upload-offset');

        if ($uploadOffset && $uploadOffset !== (string) $meta['offset']) {
            return HttpResponse::HTTP_CONFLICT;
        }

        $contentType = $this->request->header('Content-Type');

        if ($contentType !== self::HEADER_CONTENT_TYPE) {
            return HTTPRESPONSE::HTTP_UNSUPPORTED_MEDIA_TYPE;
        }

        return HttpResponse::HTTP_OK;
    }
protected function verifyPatchRequest(array $meta) : int
    {
        if (self::UPLOAD_TYPE_FINAL === $meta['upload_type']) {
            return HttpResponse::HTTP_FORBIDDEN;
        }

        $uploadOffset = $this->request->header('upload-offset');

        if ($uploadOffset && $uploadOffset !== (string) $meta['offset']) {
            return HttpResponse::HTTP_CONFLICT;
        }

        $contentType = $this->request->header('Content-Type');

        if ($contentType !== self::HEADER_CONTENT_TYPE) {
            return HTTPRESPONSE::HTTP_UNSUPPORTED_MEDIA_TYPE;
        }

        return HttpResponse::HTTP_OK;
    }
protected function verifyPatchRequest ( array $ meta ) : int { if ( self :: UPLOAD_TYPE_FINAL === $ meta [ 'upload_type' ] ) { return HttpResponse :: HTTP_FORBIDDEN ; } $ uploadOffset = $ this -> request -> header ( 'upload-offset' ) ; if ( $ uploadOffset && $ uploadOffset !== ( string ) $ meta [ 'offset' ] ) { return HttpResponse :: HTTP_CONFLICT ; } $ contentType = $ this -> request -> header ( 'Content-Type' ) ; if ( $ contentType !== self :: HEADER_CONTENT_TYPE ) { return HTTPRESPONSE :: HTTP_UNSUPPORTED_MEDIA_TYPE ; } return HttpResponse :: HTTP_OK ; }
Verify PATCH request.

@param array $meta

@return int
Verify PATCH request .