0
Not a bug

don't use Google Drive file type

etoileBleu 9 years ago in iPad updated by Josh Shortlidge 7 years ago 11

The Google drive file type grays out files, so you cannot open them in iPad Textastic.


1. Files uploaded that can be changed to Google Docs will get the Google file type. Textastic will not open those files (show up as grayed out). Even a plain text *.txt file will be changed to Google file type and then you cannot open in Textastic.


2. Coding files, in plain text, has all kinds of crazy extensions. Google doesn't know those so it sets the file type as Binary. Textastic grays those files out so you cannot open them from Google Drive.


(horrible) workaround: change the file extension to .xml then upload. It is okay to remove the .xml extension in Drive after as the file type will not change.

If you upload .txt then you must uncheck the option "convert to Google Docs format" beforehand.


In both cases the exact same file will open fine locally on the iPad

Basically, it is an annoyance from Google. But I would much rather that you let me try to open a file first, rather than block me from opening. They are all text files.


I want to use Textastic for coding, and this would be a big help using Google Drive to open files


Under review

Do you have screenshots or a step-by-step list so I can try to reproduce the problem on my device?

This is how I reproduce:

1. Open file locally with *.abc extension

2. Click the share icon, select send to > copy to Google drive

3. From Google Drive, select file > open with > copy to Textastic. That works, but it's only a local copy that is under edit.

4. From Textastic select Open ... > Google Drive > browse to the main folder where step 2 saved. The file is grayed out and cannot be open.


When uploading to Google, if the file extension is not a known one (ex. not xml or txt) then it is marked as file type binary. That seems to be the difference when opening on iPad Textastic.


I can upload the exact same text file with .xml extension, then Google marks file type as okay. I can even change the extension to anything after that as the file type does not change now.


Same problem happens with .txt files (known Google extension) IF your Google drive settings are to convert to Google Docs; that gives file type of Google Doc and the file is greyed out.


btw, to view the Google docs file type I had to use a desktop PC. The Google Drive app on iPad does not show the file type detail (as text, binary, Google, etc)

Not a bug

When Textastic shows the document picker, it tells the system that it is able to open the following document types (UTI or uniform type identifiers):


public.text, public.plain-text, public.source-code, and public.script


It is up to the document provider (Google Drive in this case) to match the document types to the files it provides. Google Docs files are not plain text files, so they are greyed out.


I tried the following:

- open a .json file in Textastic

- tap on the action button, select "Open In…" and choose "Copy to Drive"

- the file is saved in Google Drive

- I could now successfully use "Open…" and select the .json file in Google Drive


I tried the same with a .txt file and it worked without problems.


I also uploaded a .txt and an .html file on my desktop computer using https://drive.google.com/drive/my-drive and could successfully open it using the Open… command in Textastic.


The whole system only works if the file extension is known to the system. An extension like ".abc" is not known to the system and cannot work.

Hi Alexander,


> The whole system only works if the file extension is known to the system. An extension like ".abc" is not known to the system and cannot work


File extensions .c and .cpp belong to the "public.source-code" group you've mentioned.

I have both .c and .cpp files on my Google Drive - but they are *grayed out*, so I cannot open them in Textastic.

Maybe Textastic really uses "public.text" only, but not "public.source-code".


> I also uploaded a .txt and an .html file on my desktop computer using https://d> rive.google.com/drive/my-drive and could successfully open it using the Open… command in Textastic.


Please try to upload a .c file.

I can confirm that I can not open .c files from Google Drive.


It looks like Google Drive is not correctly implementing this, since it does work when I try to open a .c file from iCloud Drive. So it would probably best to report this bug to Google.

But even your text file would not work if you have the "convert to google docs" setting turned on.


To change how files are uploaded

  1. click on the settings gear in the top-right corner
  2. click on Settings
  3. to convert uploaded files to Docs format, check the box for Convert uploaded files to Google Docs editor format and click Done
    ""



Why not allow Textastic to open any file extension?

Or is that not possible on iOS?

It makes no sense for Textastic to tell the system that it can open all file types like images, office documents or video files since Textastic can only edit plain text files.

Hi, Just discovered I can't edit python .py files on Google docs from ipad.

This seems to be the same problem as with .c files and is most likely a bug in Google Drive.

PHP .php files are editable however.

I have a collection of miscellaneous text documents that I have saved in a "Personal Notes" folder.


One of the main reasons I have those files in Textastic is to remove any formatting.

For example if I copy some text from Gmail, it often has strange Gmail formatting that I want removed.

So by pasting them into Textastic, and saving them, then any HTML or other weird formatting will be removed.

The text will literally be the text that is shown on the Textastic editor.

Correct?


Now I would like to SYNC all of the miscellaneous text documents in that "Personal Notes" folder into a mirrored "Personal Notes" folder in Google Drive.

Can that be set up?

So any time I ADD a new documnet, or EDIT an existing one, then those additions/changes will be updated into Google Drive?


Otherwise Textastic is amazingly simple to use. 

Very cool... a lot of work went into this!

I look forward to using it on my PHP and JS files as well.