Using Google Drive as a file server

Have you ever been in a situation where you need to host several files on the Web? Did you need for those files to have a dedicated URL? Personally, I have had few situations where this was the case, but today I encountered a learning activity that required students to quickly upload images they just captured so they could add them to a Google Map. After some searching around, I found that the Google Drive hosting API is perfect for this sort of thing. Here is what I did ...

Create Drive Folders

The first thing I had to do was create a set of Google Drive folders for students to put the images they just captured. For this activity, students were running around our university taking pictures of some of the landmarks. They were then going to use these images to create an interactive map of the campus with the My Places tool in Google Maps. I created several folders in a Google account I use only for this class. My TA's and I connected a class set of iPads to this account so the students could load their images directly into Drive, which is what they did as soon as they got back to the classroom.

An important step in this process is to set the permissions for the folders to Public. You can do this directly through Drive. You will find the folder, right-click and choose Get Link.

 

Screen Shot 2014-11-11 at 10.56.52 PM

 

You will then need to change the permissions. Google has a great explanation for how to do that right here.

Set Up the Hosted Site

This part is actually much easier than you might think. The first thing you need to do is grab this little URL:

http://googledrive.com/host/<folderID>/

Not sure where to find the folderID? I discuss it in this post. The URL will end up looking something like this:

http://googledrive.com/host/0B5YVN51uO5e_WGtSc2tBDB2bUk/ (don't worry, it doesn't work)

Google will add some characters to this URL as soon as you hit enter, but don't worry. It will work just fine. Here is an example of the files my students uploaded today. Screen Shot 2014-11-11 at 11.04.13 PM Once students have found the image they need for their project, they will need to copy the URL so they can paste it (above).

Note: The only files that will show up in the hosted folder are image, video, document (Word, PDF, etc.), and HTML (and other web-authoring files). Google Docs, Slides, Sheets and Drawing files will NOT show up in the hosted folder.

In my case, the students were pasting these URLs into a Google Map placemark so their images would show up when the placemark was clicked. Several of them held the iPad the wrong way, so their images are sideways. (Sigh.) Here is the map we created in class.

So, that's it. Students can take images, quickly upload them to a Google Drive folder, and they are instantly hosted on the Web with a dedicated URL. No logging in, no FTP, clunky photo albums. Just my files and their URLs. I don't think I will need this functionality all that often, but it sure will be handy when I do.