2

I have an iframe embed as follows, which is currently public:

<iframe src="https://drive.google.com/embeddedfolderview?id=0B3gN5-3YYPjHeGlTVjduRnBTVGs#list" width="100%" height="500" frameborder="0"></iframe>

and it will show up in my website, but it will not navigate folders within that iframe, but instead navigate to a new window. Is there a way to make all navigate stay self contained in the iframe?

You can see samples of this at: http://help.realsmart.co.uk/embedding-a-google-drive-folder-in-a-post-or-page/

which shows how to embed a folder. It looks nice, but when navigating into deeper folders, it just navigates away.

Edit Added Fiddle: https://jsfiddle.net/0y4cm891/

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129
  • Your sample link is broken (500). Testing on my own box opens links in new tab. Same if opening the URL directly. It's probably something in /static/doclist/client/js/789028772-doclist_folderlandingpage__es.js or some other part of the JS stuff. –  Jan 13 '16 at 01:52
  • Mm.. ok. I was hoping there was some sort of Google Drive Hierarchy walker. Maybe not – Fallenreaper Jan 13 '16 at 02:03

1 Answers1

1

Edit on 5 April 2020: I made a new tool specifically for this purpose. For details and steps, read my answer to this similar question: https://stackoverflow.com/a/61034751/8111094

Old answer: There are two ways to do this.

  1. If you are using wordpress, you cam simply use the plugin Use Your Drive (its a paid plugin). There are few other similar plugins as well. As far as I have seen, none are free.

  2. Use the Google Drive API, it will require you to write your own app and a google cloud account. Watch this video of a similar use case published by google https://www.youtube.com/watch?v=Z5G0luBohCg

ssy
  • 129
  • 2
  • 9
  • Thank you for revisiting this. The app was not wordpress, and using the drive api to walk the public readonly folder is overkill. For the duration of use, I left it as an iframe which opened to a new tab. It kept it simple. – Fallenreaper Jan 06 '20 at 20:53
  • what was your app? if you weren't using wordpress then there's another tool called steegle embed and search gadget for google drive, but its expensive – ssy Jan 06 '20 at 21:34
  • It was originally a hand rolled AngularTS app i hosted on my server which allowed me to distribute reading material to customers from Drive as opposed to hosting the data on my server, allowing me to optimize my server's up/down limitations, and it would allow me to update Drive accordingly to maintain documents. – Fallenreaper Jan 06 '20 at 21:38
  • a workaround could be to make a wordpress site (on a free platform, such as free tier of aws/gcp), put the most minimalistic theme which shows only the post content and then show that in the iframe on your app. – ssy Jan 06 '20 at 21:51
  • While I find the information useful, it doesnt fulfill the criterion because I shouldnt have to create a wordpress site ( this is hosted on AWS Freetier already) nor write a custom app to just display this information, so while it is guidance, I dont find it as _the_ answer. Thats also why im neither upvoting nor downvoting it. – Fallenreaper Jan 06 '20 at 22:14
  • @Fallenreaper I have updated my answer to include the link to a better alternative which I feel fits perfectly in your use case. – ssy Apr 24 '20 at 18:23