client = new Client($accessToken); $this->adapter = new DropboxAdapter($this->client); $this->fileSystem = new Filesystem($this->adapter); if (isset($this->fileSystem->listContents()[0])) { $this->path = $this->fileSystem->listContents()[0]['path']; } } public function getBackups() { return $this->fileSystem->listContents($this->path); } public function downloadBackup($baseName) { $file = $this->adapter->read($this->path.'/'.$baseName)['contents']; header("Content-Type: application/zip"); echo $file; } }