Skip to content

Commit

Permalink
requestToExApp: removed CURLStringFile (#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 authored Jan 25, 2024
1 parent 8e53651 commit 9d187b6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/Service/AppAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,30 +105,6 @@ public function requestToExApp(
$options['auth'] = $auth;
}

$isMultipart = false;
$multipartData = [];
if ($method === 'POST' || $method === 'PUT') {
foreach ($params as $key => $value) {
if (is_a($value, 'CURLStringFile')) {
$isMultipart = true;
$multipartData[] = [
'name' => $key,
'contents' => $value->data,
'filename' => $value->postname,
'headers' => ['Content-Type' => $value->mime]
];
} else {
$multipartData[] = [
'name' => $key,
'contents' => $value
];
}
}
if ($isMultipart) {
$options['multipart'] = $multipartData;
}
}

if ((!array_key_exists('multipart', $options)) && (count($params)) > 0) {
if ($method === 'GET') {
$url .= '?' . $this->getUriEncodedParams($params);
Expand Down

0 comments on commit 9d187b6

Please sign in to comment.