New Media Technology News
New Media Technology News

Google Drive Announces Site Publishing

You can now publish web content with Google Drive according to the Google Apps Developer Blog.

Google Drive Site Publishing

“Your app can now insert static web assets in a publicly shared folder, and then serve those files directly to users via file names in a relative path. Google Drive site publishing supports JavaScript, so it’s even possible to run a JavaScript Drive app directly from Drive.

Publishing from Drive is a simple, two-step dance: create a public folder and use a link to the root folder — the webViewLink — to publish its contents. You can refer to the Drive SDK documentation for full detail on how to work with public folders and content links, but basically the requirements are:

The folder containing site assets must be public. Assets added to public folders must also be public on the web.

Link to the files contained in the folder using the webViewLink (included in the folder’s JSON representation).

It’s important to emphasize the added simplicity provided by a webViewLink: using this link as a starting point, you can extend the path to any web asset in any subfolder without worrying about retrieving the exact file ID. What used to look like 0B2Gk2F2ImIBiaUkwY3JNX1JMaTg is now a recognizably cute path such as images/kittens.jpg. For the root path to the folder, we’ll display a list of files in the folder, or, if you have an index.html file in your folder we’ll load that as expected.”

To see Google Drive site publishing in action, cvisit this example site served from Google Drive at