- Content-Type not right
src/Oracle/Oci/ObjectStorage/ObjectStorageClient.php
line 2673
$__headers = ['Content-Type' => 'application/json', 'User-Agent' => UserAgent::getUserAgent()];
upload image Content-Type always application/json
change $__headers
$__headers = ['User-Agent' => UserAgent::getUserAgent()];
now upload image Content-Type: image/jpeg
How to ensure the Content-Type is correct?
Modify the source code or have other settings
- How does it work?
src/Oracle/Oci/ObjectStorage/ObjectStorageClient.php
line 2692
if ($contentType != null) {
HttpUtils::addToArray($__headers, "contentType", HttpUtils::attemptEncodeParam($contentType));
}
src/Oracle/Oci/ObjectStorage/ObjectStorageClient.php
line 2673
$__headers = ['Content-Type' => 'application/json', 'User-Agent' => UserAgent::getUserAgent()];
upload image Content-Type always application/json
change $__headers
$__headers = ['User-Agent' => UserAgent::getUserAgent()];
now upload image Content-Type: image/jpeg
How to ensure the Content-Type is correct?
Modify the source code or have other settings
src/Oracle/Oci/ObjectStorage/ObjectStorageClient.php
line 2692
if ($contentType != null) {
HttpUtils::addToArray($__headers, "contentType", HttpUtils::attemptEncodeParam($contentType));
}