Google Drive Open with menu Mime Type for Google files

倾然丶 夕夏残阳落幕 提交于 2020-01-07 04:28:19

问题


I have an issue when I want to add the Google Mime Types in the developer console to allow my app to open Google Files. In the developer console in the section "Integrate with Drive interface" I set some mime type like 'application/pdf' or 'image/png' no issue and in the drive interface in the open with menu I find my app.

I want to set Mime Types for Google Drive files but when I want to save modification in developper console I get an error "User request is not valid. Please verify your url and retry". This is not the real error because I got it in french. Exact error message : The user request is invalid. Please check your URL and try again.

I tried Mime type we found here : https://developers.google.com/drive/web/mime-types?hl=fr

I also tried Mime Type like : application/vnd.google-apps.kix for gdoc or application/vnd.google-apps.ritz for sheets but no results. I also tested gsheet, gdoc but no result.

If I try application/vnd.google-apps.folder it works.

I tried to add that in the Default Mime Type and Secondary Mime Type field but same result.

I don't know what to do more....


回答1:


In fact to open a Google document with your app in Google Drive you have to check the importing function (Allow users to open files that can be converted to a format that this app can open.) See ref : https://developers.google.com/drive/web/integrate-open#open_and_convert_google_docs_in_your_app

My understanding is you can't open a google document but just "import in your app" the current version in a specific format. Don't forget to add in the mime type your app can open a mime type the google file can be exported. See google developer page for a compatible mime type.



来源:https://stackoverflow.com/questions/31525975/google-drive-open-with-menu-mime-type-for-google-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!