nikkiii / flysystem-acd Goto Github PK
View Code? Open in Web Editor NEWFlysystem adapter for Amazon Cloud Drive
Flysystem adapter for Amazon Cloud Drive
this is my code:
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->io = new SymfonyStyle($input, $output);
$this->io->title('Authorize Amazon Cloud Drive');
$cache = new SQLite('email', './cache');
$drive = new CloudDrive('email', 'client_id', 'secret', $cache);
$response = $drive->getAccount()->authorize();
if (!$response['success']) {
print_r($response); // Get the URL from here
}
// Input the resulting redirected url
$url = readline();
$response = $drive->getAccount()->authorize($url);
// Initialize Node
Node::init($drive->getAccount(), $cache);
// Sync your local cache with the current state of your Cloud Drive.
$drive->getAccount()->sync();
$flysystem = new Filesystem(new AmazonCloudDrive($drive));
}
Nothing happens...
I cannot find the package over at packagist, so when running:
composer require nikkiii/flysystem-acd
I get thrown an InvalidArgumentException
.
I couldn't get this to work at first. I got thrown an exception saying
No node by name 'Cloud Drive' found in the database.
The solution was pretty simple, I just added:
$drive->getAccount()->sync();
After
// Initialize Node
Node::init($drive->getAccount(), $cache);
I can make a PR if you'd like...
Hey guys,
this is my code which works on my local machine:
if ('COMPLETE' == $file['basename']) {
$renamed = $flysystem->rename($file['path'], str_replace('COMPLETE', '.complete', $file['path']));
var_dump($renamed);die();
}
But on ACD its all the time false
, do i need to activate something special?
This would be awesome ๐
@alex-phillips has now merged the "streams" PR and the dependency can be changed to "dev-master".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.