uploading image/jpeg in space

June 4, 2018 123 views
API CDN

I cant figure how to upload an image in space with metadata image/jpeg.
I tried everything and that's is not working. File is always showing as "application/octet-stream" in space.

I did this :

$this->getClient()->upload($this->getBucket(), $fileName, $content, $privacy, [
'Metadata' => ['contentType' => 'image/jpeg']
]);

Be the first one to answer this question.