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;
        }
    }
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;
        }
    }
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 ; } }
This function uploads the file to the API using simple upload
This function uploads the file to the API using simple upload