Saving a remote file from Google Drive?
Permalink
Hi I am using the GoogleDriveAPI to build a podcast, however I am now hitting a wall in that Google Drive doesn't support Byte Range Requests, so i'm thinking is it possible to run a script to save the mp3 files to the concrete5 cache / file manager for say 2 weeks, and serve to apple podcast from there?
At the moment i have this code, but I can't get the remote importer to work.
Thanks in advance for any thoughts / advice
At the moment i have this code, but I can't get the remote importer to work.
function saveRemoteFile($fileurl) { $token = \Core::make('token')->generate('import_remote'); # Our image data $data = array( 'ocID' => 0, 'ccm_token' => $token, 'url_upload_1' => $fileurl ); # Create a connection $url = REL_DIR_FILES_TOOLS_REQUIRED . '/files/importers/remote'; $curlSession = curl_init($url); # Form data string $postString = http_build_query($data, '', '&'); curl_setopt($curlSession, CURLOPT_POST, 1); curl_setopt($curlSession, CURLOPT_POSTFIELDS, $postString);
Viewing 15 lines of 21 lines. View entire code block.
Thanks in advance for any thoughts / advice
Which looks like its a file permission error: