nao-pon/flysystem-google-drive

upload method in the GoogleDriveAdapter can't be accessed.

psr2 opened this issue · 0 comments

psr2 commented

why the following code can't access upload method in the GoolgeDriveAdapter class?

public function __construct(){
//google credentials here
$this->service = new \Google_Service_Drive($this->client);
$adapter = new GoogleDriveAdapter($this->service, '');
$this->filesystem = new Filesystem($adapter);
}
public function uploadFiles(){
$this->filesystem->upload();
}
I am able to access getMetadata , write , createDir and many other methods, but i can not access upload class from $filesystem instance.The upload method type is protected.How can i access this method to upload a file
The Error is
BadMethodCallException
Call to undefined method League\Flysystem\Filesystem::upload