Controller/MediaController.php
public function uploadNewVersionChunked($fileData, $id, $revisionComment, $name, $chunk, $chunks, $fileId)
        {
            $parameters = [
            'query' => [
                'revisionComment' => $revisionComment,
                'name' => $name,
                'chunk' => $chunk,
                'chunks' => $chunks,
                'fileId' => $fileId,
            ],
            'multipart' => [
                [
                    'name' => 'file',
                    'contents' => \GuzzleHttp\Psr7\stream_for($fileData),
                    'filename' => $name,
                ],
            ],
            'headers' => null,
        ];
            $result = $this->post('v1/media.json/' . $id . '/version', $parameters);

            return $result;
        }
public function uploadNewVersionChunked($fileData, $id, $revisionComment, $name, $chunk, $chunks, $fileId)
        {
            $parameters = [
            'query' => [
                'revisionComment' => $revisionComment,
                'name' => $name,
                'chunk' => $chunk,
                'chunks' => $chunks,
                'fileId' => $fileId,
            ],
            'multipart' => [
                [
                    'name' => 'file',
                    'contents' => \GuzzleHttp\Psr7\stream_for($fileData),
                    'filename' => $name,
                ],
            ],
            'headers' => null,
        ];
            $result = $this->post('v1/media.json/' . $id . '/version', $parameters);

            return $result;
        }
Upload a new version of a media.

This upload endpoint has been specifically tailored to fit chunked uploading (works well with Plupload2 for example). Max chunk size is about 10mb, if your files are larger than this, split it up and set correct chunk and chunks argument in the call.
For example a 26mb file might be split in 3 chunks, so the following 3 calls should be made
POST /media.json?chunks=3&chunk=0&filename=largefile.txt&categoryId=1 (file data is sent in body)
POST /media.json?chunks=3&chunk=1&filename=largefile.txt&categoryId=1&fileId=<fileId from first call> (file data is sent in body)
POST /media.json?chunks=3&chunk=2&filename=largefile.txt&categoryId=1&fileId=<fileId from first call> (file data is sent in body)

@param  mixed  $fileData        the file's data content
@param  int    $id              the Media identifier
@param  string $revisionComment The revision comment
@param  string $name            Filename of the file being uploaded
@param  int    $chunk           The chunk we are currently uploading, starts at 0
@param  int    $chunks          Number of chunks you will be uploading, when (chunk - 1) == chunks the file will be considered uploaded
@param  string $fileId          A unique fileId that will be used for this upload, if none is given one will be given to you
@return array