original_string: protected function upload($path, $contents, $opts = []) {
          $location = $this->applyPathPrefix($path);
          try {
              $tmpfile = tmpfile();
              fwrite($tmpfile, $contents);
              $localFile = $this->getStreamUri($tmpfile);
  
              $obj = $this->client->simpleUpload($localFile, $location, $opts);
              fclose($tmpfile);
              return $this->normalizeResponse($obj);
          } catch (DropboxClientException $e) {
              return false;
          }
      }
code: protected function upload($path, $contents, $opts = []) {
          $location = $this->applyPathPrefix($path);
          try {
              $tmpfile = tmpfile();
              fwrite($tmpfile, $contents);
              $localFile = $this->getStreamUri($tmpfile);
  
              $obj = $this->client->simpleUpload($localFile, $location, $opts);
              fclose($tmpfile);
              return $this->normalizeResponse($obj);
          } catch (DropboxClientException $e) {
              return false;
          }
      }
code_tokens: protected function upload ( $ path , $ contents , $ opts = [ ] ) { $ location = $ this -> applyPathPrefix ( $ path ) ; try { $ tmpfile = tmpfile ( ) ; fwrite ( $ tmpfile , $ contents ) ; $ localFile = $ this -> getStreamUri ( $ tmpfile ) ; $ obj = $ this -> client -> simpleUpload ( $ localFile , $ location , $ opts ) ; fclose ( $ tmpfile ) ; return $ this -> normalizeResponse ( $ obj ) ; } catch ( DropboxClientException $ e ) { return false ; } }
docstring: This function uploads the file to the API using simple upload
docstring_tokens: This function uploads the file to the API using simple upload