code: protected function uploadSlice(Slice $token, Slice $options, string $file = null): Slice
      {
          $params = $options->getData('params', []);
  
          if ($file)
          {
              $params = Arr::merge($params, [
                  'file' => '@' . \ltrim($file, '@')
              ]);
          }
  
          return new Slice([
              'token_type'   => $token->getRequired('token_type'),
              'access_token' => $token->getRequired('access_token'),
              'method'       => $options->getData('method', 'post'),
              'url'          => $options->getData(
                  'url',
                  $this->slice->getRequired('app.url.upload')
              ),
  
              'allow404' => $options->getData('allow404', false),
  
              'headers' => Arr::merge($options->getData('headers', []), [
                  'Accept' => 'application/json'
              ]),
  
              'params' => $params
          ]);
      }
docs: @param Slice  $token
  @param Slice  $options
  @param string $file
  
  @return Slice