


Drive File Stream will mirror your entire Google Drive account to the File Manager. Unlike Backup & Sync, there is no way to sync selected folders on the device. Step 3: Sign in using your Google account credential, and you are good to go.įrom now on, you will see Google Drive File Stream disk in the Windows File Manager. Step 2: Open the downloaded file and go through the usual setup process. Step 1: Download and Install Drive File Stream using the link below.ĭownload Google Drive File Stream for Windowsĭownload Google Drive File Stream for Mac Follow the steps to set up Drive File Stream. If your Windows or Mac laptop has low storage and you are a power user of Google Drive, I will strongly recommend giving a shot to Drive File Stream. Anyone with a Google account can set up and use File Drive Stream on Windows or Mac. Google wants to extend these features to regular Drive accounts as well. In a way, it functions like a NAS, partially if not completely.ĭrive Stream used to be limited to only G Suite accounts.


Request = service.files().get_media(fileId=' folder_id')ĭownloader = MediaIoBaseDownload(fh, request)Drive File Stream does things differently by letting you access your computer’s file browser instead of locally downloading your content. Path(folder_path).mkdir(parents=True, exist_ok=True)įilename = os.path.join(folder_path, 'meme.jpg') # from apiclient.http import MediaFileUploadįrom googleapiclient.http import MediaIoBaseDownload The test way is to right click on the file and click “Get link”, but if you need to list directory content to get a bunch of files and their id, I will point you to the right direction: results = drive_service.files().list(q="'" + folder_id + "' in parents", pageSize=200,fields="nextPageToken, files(id, name)").execute()īack to downloading: from _future_ import print_function Now let’s download this image back to some directory on my computer. # TODO(developer) - Handle errors from drive API. Media = MediaFileUpload('meme.jpg', mimetype='image/jpg')įile = service.files().create(body=file_metadata, Service = build('drive', 'v3', credentials=creds) If creds and creds.expired and creds.refresh_token:įlow = om_client_secrets_file( From import Requestįrom import Credentialsįrom google_auth_oauthlib.flow import InstalledAppFlowįrom googleapiclient.discovery import buildįrom googleapiclient.errors import HttpErrorįrom apiclient.http import MediaFileUploadĬreds = om_authorized_user_file('token.json', SCOPES)
