spatie / flysystem-dropbox

A flysystem driver for Dropbox that uses the v2 API
https://freek.dev/734-dropbox-will-turn-off-v1-of-their-api-soon-its-time-to-update-your-php-application
MIT License
342 stars 50 forks source link

Is there a way to change on the fly the token? #23

Closed fullstackdevelope closed 7 years ago

fullstackdevelope commented 7 years ago

each user has it's dropbox token in db , and I need to set the token before i try to use the disk,

Question: how can I change the token so I could write in each users's folders?

AlexVanderbist commented 7 years ago

There's no way to change the DropboxClient or its accessToken once the DropboxAdapter is instantiated. This means you'll have to create a new DropboxClient and DropboxAdapter instance for every user.