How can i export xlsx file and upload in google drive in laravel - google-drive-api

I need some help here if someone knows, I'm creating a laravel backend where I configured Google Drive API (with the git of nao-pon/flysystem-google-drive:~1.1), I am using this for uploading file in google drive for backup.
Storage::disk('google')->put('file1.txt', $data);
I need to upload data from database and create .xlsx formet and upload in google drive please help.

Related

Building cloud service using python google drive API

Hi i'm trying to make my own cloud web service that uses python google drive API.
what i'm trying to make is basically cloud service but can also interact with Google Drive.
To do that, my web service users have to have their own 'storage.json' file in their server's virtual directory (which really stores in server).
when I somehow get my own 'storage.json' file, (I followd: https://developers.google.com/drive/api/v3/manage-uploads)
and upload 'storage.json' file to my directory like User1, upload and download with Google drive works just fine.
but my final goal is when my user doesn't have 'storage.json' file in their directory like User2, I want browser to pops up in User2's computer and User2 can follow the google's authentication flow and finally download 'storage.json' file into server's ~/User2/ directory.
Do you think this is possible? or if there are better ways, can you notice me? thank you

PyDrive Get the Backup List

I want to write a script that downloads backups from Google Drive. Then i will alter the backup and download it again.
I want to do it with PyDrive or directly Google Drive API but I couldn't find any documentation about "backups". I can search, modify, alter normal files and folders but not backups.
Is there any way of to download the backup files by API?

How to save a file from URL to Google Drive

is there a way to automatically download a file "example.com/example.zip" directly to my Google Drive instead of downloading it to my server and uploading it again?
In Drive API there is no method to upload a file directly from a URL, with files.create you still have to upload the media. But if you don't want to use your server, you can go for Apps Script, which gives you access to the Drive API via the Advanced Drive Services, as well as the Built-in Drive service, plus some other services like Url Fetch Service with which you could make a request to download from the URL of the file and capture the blob; then use DriveApp.createFile(blob) to upload to Drive.
The beauty of it, it all happens in the cloud in Apps Script servers. Of course you are subject to Apps Script's and Drive API's quotas and limits.
Quotas for Google Services

how copy files from google drive to an ftp server using google app scripts?

I have a project on Google App Scripts connected to my drive.
I was able to save and organize my files (from mail) and directories in the drive using the script.
now, I want to save the files to an FTP server and cannot find the References to do so.
how do I access an ftp server, create folders and upload files to them ?
thanks
It seems this is not possible. If you check this Class UrlFetchApp, app script only supports HTTP and HTTPS communication over the internet. A supporthing SO thread seems to confirm this.
The workaround to go from GAS -> FTP is as follows. I've been using this method for a number of years in production.
From apps script, save the file to google drive
Using Zapier, trigger to copy new filesfrom the google drive folder to a DropBox folder
Using Microsoft Flow, trigger to copy new files from the Dropbox folder to an FTP or SFTP location.
You can probably do step 3 in Zapier as well. I use Microsoft Flow because I already had a significant number of automated tasks setup there. For Step, 2, I use Zapier because MS flow does not yet have a built-in trigger available based on a new file being saved to google drive. You would have to make your own custom trigger using the google drive API's.

Is there a way in vb.net to determine if google drive is syncing a file?

I have written a vb.net application that shares a file on google drive. I need to be able to determine when google drive is in the process of syncing the file.