Thursday, July 10, 2014

Host Files in Google Drive

This is something I came across recently, and I think it's a pretty cool little "easter egg" that's a part of Google Drive. You can create a public folder, and anything you put into that folder will have a live URL, which can be useful for linking, hosting files, and so on. This comes in especially handy if you want to use those images in other places on the web, but have one master copy. Any changes made to the master will automatically be transferred to all its locations.

1. Public Folder

First, you'll need to create a public folder in your Google Drive. That's pretty simple: create a folder, then click on the sharing button, and share it as "public on the web."

2. Folder Key

The next step might sound confusing, but it's actually not that challenging. You need to get the folder key of the folder you just created. In Google Drive, navigate so that you're looking in the folder you want, then look at the URL in the address bar. The folder key is made up of a bunch of nonsense characters that are the last part of the URL, directly following /#folder/
Copy the folder key by highlighting it and pressing Control-C (or Command-C on a Mac).

3. URL

Now comes the easy part. Your folder already has a public URL. To find it, type in http://www.googledrive.com/host/ and then paste your folder key directly afterwards. You should end up with something that looks like http://www.googledrive.com/host/0B9exArxMGDDteHNrRHg2bjRHTHc

Not all file types can be hosted this way. Images, website files (html, xml and javascript), and possibly videos (I haven't tried yet). You can click on the link above to see the folder I created and shared for this blog post.

No comments :

Post a Comment