Controller/MediaController.php
public function uploadPreview($fileData, $id)
        {
            $parameters = [
            'query' => [],
            'multipart' => [
                [
                    'name' => 'file',
                    'contents' => \GuzzleHttp\Psr7\stream_for($fileData),
                    'filename' => 'preview-file',
                ],
            ],
            'headers' => null,
        ];
            $this->post('v1/media.json/' . $id . '/uploadpreview', $parameters);
        }
public function uploadPreview($fileData, $id)
        {
            $parameters = [
            'query' => [],
            'multipart' => [
                [
                    'name' => 'file',
                    'contents' => \GuzzleHttp\Psr7\stream_for($fileData),
                    'filename' => 'preview-file',
                ],
            ],
            'headers' => null,
        ];
            $this->post('v1/media.json/' . $id . '/uploadpreview', $parameters);
        }
Upload a new preview for a media.

Replaces the current preview thumbnails for a media with the supplied one. Recommended image size is minimum 1000px on the longest side. If a PDF is uploaded it will be added as a preview document. This enables users to browse documents directly from within QBank. The maximum recommended file size is 10MB.

@param mixed $fileData the file's data content
@param int   $id