Steve P
Steve P

Reputation: 709

Getting google documents as downloadUrl

I am currently trying to get the downloadURL from a response sent via my server of which, whenever $file->getdownloadUrl() is used it returns ['downloadURL'] =>

My question is, is it possible to download Google Documents in the application/vnd.google-apps.document MIME Type?

My assumption is, these would contain a link to the online version of the document, but it would be good to be able to edit the document in the correct format so that any formatting done would be retained when re-uploaded to drive,

Regards,

Upvotes: 1

Views: 96

Answers (1)

JunYoung Gwak
JunYoung Gwak

Reputation: 2987

Nope, you cannot download Google Documents in application/vnd.google-apps.document MIME type. You only can export it to other formats.

Some workarounds:

  1. Apps script Document Services provide a little bit better control over the document, but you won't be able to get full control over all formatting for now.
  2. Export file as known formats such as Microsoft words and edit it. When you upload it back to Drive, you can request to convert it back to Google Docs format. Although you might possibly lose or corrupt with some formatting.

Upvotes: 1

Related Questions