Mori
Mori

Reputation: 6850

Google Drive web hosting: deny directory listing

I had my website hosted on a Google Drive public folder based on the following post: http://googleappsdeveloper.blogspot.com/2012/11/announcing-google-drive-site-publishing.html
Sample website:
https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM

Now the problem is a link to the root folder displays all the files on my public folder. I know I can prevent it by adding an index.html file to my public folder to replace the listing, but my folder contents are still accessible through the following URL:
https://drive.google.com/folderview?id=FOLDER-ID&usp=sharing
You can even access them by signing in to your own Google account and navigating to the following page:
https://drive.google.com/#folders/FOLDER-ID
In comparison, on a public folder/subfolder on Dropbox each individual file is publicly available, but the root directory listing is denied.
Examples:
Folder: https://dl.dropboxusercontent.com/u/4017788/logo.png
Subfolder: https://dl.dropboxusercontent.com/u/4017788/Labs/image1.jpg

How can I achieve the same functionality on a Google Drive public folder?

Thanks!

Upvotes: 1

Views: 705

Answers (1)

Burcu Dogan
Burcu Dogan

Reputation: 9213

The ACL semantics of Drive is quite different than Dropbox's sharing. In order to make a folder publishable you need to at least give read access to public, meaning once your directory ID is known, it could be listed via the front-end and the API.

In the longer term, we can restrict the listings by not listing children files shared with public but only with those who knows the link.

Upvotes: 0

Related Questions