code: protected function multipart(array $params): array
      {
          $results = [];
  
          foreach ($params as $key => $value)
          {
              $content = [
                  'name'     => $key,
                  'contents' => $this->value($value)
              ];
  
              if (\is_resource($content['contents']))
              {
                  $content['filename'] = basename($value);
              }
  
              $results[] = $content;
          }
  
          return $results;
      }
docs: @param array $params
  
  @return array