Importing from Google Drive, E_FILE_INVALID error
Permalink
Hi i'm trying to import files from Google Drive into the system, there are a number of reasons for this, and rather than using files manager I want my package to filter the files in drive via the api and then upload them. However i'm getting the error: E_FILE_INVALID
You can see the url to the file here:http://www.harvestchurchalton.org/drivecast/refresh/local...
(the big long one! like this:https://doc-0k-1s-docs.googleusercontent.com/docs/securesc/ha0ro937g... which is the endpoint of the normal google download url. but I can't get any version of this to 'download' into the filemanager although one can by put that url in the browser and download straight away! doh
Anyone know what i'm missing, is it a setting that will allow this? or something?
Thanks in advance
For ref:
You can see the url to the file here:http://www.harvestchurchalton.org/drivecast/refresh/local...
(the big long one! like this:https://doc-0k-1s-docs.googleusercontent.com/docs/securesc/ha0ro937g... which is the endpoint of the normal google download url. but I can't get any version of this to 'download' into the filemanager although one can by put that url in the browser and download straight away! doh
Anyone know what i'm missing, is it a setting that will allow this? or something?
Thanks in advance
For ref:
$newfiles = HelperDrivecastLocal::getNewFiles(); foreach ($newfiles as $nf) { $file = $nf['url']; $filename = $nf['filename']; $importer = new \Concrete\Core\File\Importer(); $result = $importer->import($file, $filename); if ($result instanceof \Concrete\Core\File\Version) { //$this->redirect('/my/success/page'); } else { print $result .' E_FILE_INVALID : '.$filename.' : '.$file.'<br><br> '; break; } }