iOS 11 Files app - Google Drive Large Files import issue - google-drive-api

I'am using Files app in iOS 11.
The Files app is configured for iCloud, Google Drive and DropBox
Am able to open text or CSV files with size > 200 MB on iCloud and DropBox.
But when i open a text or CSV files with size > 200 MB on Google Drive, i dont see the file contents. Small text files are not an issue with Google Drive.
The issue is also apparent when we use the UI Kit API - UIDocumentPickerViewController
As the UIDocumentPicker Apple UIKit API uses the same Files App interface and exhibits the same behaviour, we see the same error thrown by the API.
As soon as i select a text or json or xml file > 200 MB, i see these log entries and the 'documentPickerWasCancelled' event is invoked.
2017-12-22 16:19:30.233311+0530 DocumentPickerTestingGrounds[3036:431736] [DocumentManager] Failed to copy the imported file into the local container (Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 2943" UserInfo={NSDebugDescription=connection from pid 2943})
2017-12-22 16:19:30.264298+0530 DocumentPickerTestingGrounds[3036:431689] [UIDocumentLog] UIDocumentPickerViewController : didPickDocumentURLs called with nil or 0 URLS
Now i feel its a bug with Google Drive or Files app implementation for G Drive.
Am unable to find any such reference material or bug note on this issue online.
I tried deleting and re-installing Google Drive app. Its still same behaviour.
Any pointers would be appreciated.

Okay i had to use Google Drive API and then i could download files > 200MB size.
So there is an issue with Files app in iOS 11 and GoogleDrive.

Related

Google Colaboratory and Google Drive integration fails

I am not able to save a new notebook in my Google Drive environment.
Google Colaboratory works with predefined notebooks such as Hello, Colaboratory, but I am not able to save any into my Drive folder.
I have the Colaboratory app allowed in the Google Drive settings and really dont know how to solve it. Colaboratory communicates with Drive - it even creates the notebook files in the Google Drives folder, but when loading any notebook file it always report following Notebook loading error
There was an error loading this notebook. Ensure that the file is accessible and try again.
Neither the details of the error help much:
Failed to fetch TypeError: Failed to fetch
I was playing with the access rights of both the file and the folder and could not find any solution.
Update: Chrome 64.0.3282.167 (64 bit); Windows 10 1709. I use two users on the Chrome. Creating Notebooks works normally on different computers with my username.
This is the output from console:
Chrome Console Output
On Google Chrome, I was seeing this issue randomly and it mentioned not being able to load the file /some/google/path/thats/gone/because/this/fixed/it/client.js. I tried clearing my cache and hard reloading, and sure enough, Colab starting working again.
As with standard cookies, third-party cookies are placed so that a site can remember something about you at a later time. Both are typically used to store surfing and personalization preferences and tracking information.
Google's colaboratory uses third party cookies and your browser most likely has them disabled.
Navigate to your browser settings, search for cookies and enable third party cookies. This should hopefully fix your problem.
I had the same problem, and I just disabled AdBlock on google Colab in everything works perfectly.
try to close/pause AdBlock and reload the page, it works for me.

Google Drive's "Download zip" adds .txt extension to plain text files

While experimenting with Google Drive SDK, I noticed a possibly unwanted behaviour of the Google Drive web interface.
When downloading an entire folder as a zip file, some files within that folder with MIME text/plain appear in the zip with added extension .txt, even if their extension is different on Drive.
For example, I had some .conf and .asc files, which ended being .conf.txt and .asc.txt in the resulting compressed archive, respectively.
The issue seems to exist only when using the "Download zip" feature: if the files are downloaded from the web interface one by one or using the SDK the extension is the original, as expected.
For Windows, you can download all your files from Google Drive, but instead of using the browser,
Go to https://www.google.com/drive/download/
Install Google Drive Sync executable
Log into whichever Google account that has your files
Open Windows Explorer and find where your Google Drive is mapped. You should see an icon like the following:
Double-click the Google Drive icon and navigate to the folder you wish to download. You should see links to your Google files, but non-Google files are downloaded and sync'ed with Google Drive Sync like the following:
Right-click to get the context menu and select the compression program. E.g., I have 7-zip installed, so I selected 7-Zip > Add to "your_file.zip"
This will compress the files without adding any weird file extensions. I haven't tried this on Mac or other compression programs. I believe this should work for any file extension since the files are downloaded to your hard drive.
Note, you can select which folders to sync, in case you have folders that were shared with you. This prevents huge downloads, large sync times and allows you to only download and sync only what you need.
Hope that helps.
The same situation with ZIP archives. I use the usual ZIP scheme to store files, but with a different extension *.tec. Before downloading the archive, Google rigidly renames the files to *.tec.zip!
I don't see any solution other than to programmatically check the files for the "zip" extension and rename them before opening. Of course, it's a problem that my product has to fix Google's bugs, but there it is...

Partially editing a document in Google Drive

This is a conceptual question regarding the realtime editing of large files. Imagine we have a 50 Mb txt file in Google Drive that we want to allow users to edit. We require that the user downloads the entire file before they start editing (The user will have to wait for a while, but this is ok). The user then changes a single word in the 50 Mb text file. How can we possibly update the file in Google Drive without uploading all 50 Mb of text.
If you are creating an Android application, the Google Drive Android API handles this differential upload for you behind the scenes.
If you are not using the Android API, it is not currently possible via the Drive RESTful API.
You say the files are "txt" which suggests they are not Google docs. Drive considers all such files to be blobs. so I can't see anyway they can be patched.

Google Drive iOS SDK with Offline Access

I am working on a requirement where we need to support the docs in offline mode, I am planning to integrate the Google Drive iOS SDK and I would like to know weather its possible to get Offline access of google drive using the SDK approach
Google Drive "offline" is available only for files Every file you edited or created while offline will sync back with the online version of Drive when the network connection is reestablished (click on Switch to Docs online or load an entirely new Google Drive page with a refresh).
Steps to make a file offline:
Go to your drive and select a file in a folder/individual file.
Click on "i" (information) which is next to edit, navigates to Details.
You will see an option "Keep me on device". Turn it on.
This file becomes offline available.
Check this link for more information.

Google Drive Offline Document File Location

Has anyone discovered where/how offline Google Documents are stored when using Google Drive in Chrome? They must be stored locally but where?
Have tried the browser cache etc but can't see it unless I'm missing something very obvious!
To clarify, the file that is stored within 'My Documents/Google Drive' is a text file with a URL, what I am looking for is where the file that the URL points to is held when in offline mode.
It turns out the offline documents are stored in the HTML5 FileSystem.
The Chrome FileSystem storage is located here on my Windows 7 machine:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\File System
I added a number of large images to a document with the Chrome "Offline Docs" enabled and was able to see the FileSystem storage directory grow appropriately.
I then used the HTML5 FileSystem Explorer extension for Chrome to view the file structure of an offline document and was able to confirm that the images were, indeed being retrieved from the HTML5 FileSystem when Chrome was offline. See screenshot:
Further, it may interest you, the location where Google Drive stores offline docs in Android's file system.
sdcard/android/data/com.google.android.apps.docs/
Google Drive uses Chrome's IndexedDB for storing data about files. To see the contents, open developer console (Ctrl + Shift + I) and choose Resources tab.
This answer tells you about actual location of IndexedDB in the file system on Windows.
On Linux it's: ~/.config/google-chrome/Default/IndexedDB
On my computer (Windows 8.1 / Chrome version 41.0.2272.101 m) I found the filesystem at "C:\Users\my username\Appdata\Local\Google\Chrome\User Data\Profile 1\File System"
I needed to find it because I had some corrupted images in Google Slides (they worked on other computers or other browsers on my computer, just not in chrome on my computer). I deleted the File System directory and shazam, the images reloaded and were no longer corrupted.
Mine were all stored in
C:\users\%username%\Google Drive\
Have you downloaded Google Drive?
Offline access is available only when you’re using Chrome. See Setup Offline Access and Google Docs Offline. It seems like offline documents are encoded by Chrome and stored at some secret places, in order to force you to use Chrome.
Google drive stores the offline files in a folder called... android/data/com.google.android.apps.docs/files/pinned_docs_files_do_not_edit/
in that folder u will find the desired files.
Please be aware that...
The files that you will find can be of two formats..
1) encrypted
2) open type
If you have left unchecked the option to encrypt (by default in google drive) the files that u downloaded will be visible, but not accessible by the standard reader. every attempt to read it will be result in a failed operation.
But ... if you DISABLED the encryption in google drive, u will be able to open freely with any type of reader.