How to embed a Google Drive folder in a website

前端 未结 4 1252
时光取名叫无心
时光取名叫无心 2020-11-27 11:08

I have a folder in Google Drive that I\'d like to embed in my website. I can\'t find an embed code or anything documented in Google Drive Help articles.

4条回答
  •  遥遥无期
    2020-11-27 11:48

    Google Drive folders can be embedded and displayed in list and grid views:

    List view

    
    


    Grid view

    
    



    Q: What is a folder ID (FOLDER-ID) and how can I get it?

    A: Go to Google Drive >> open the folder >> look at its URL in the address bar of your browser. For example:

    Folder URL: https://drive.google.com/drive/folders/0B1iqp0kGPjWsNDg5NWFlZjEtN2IwZC00NmZiLWE3MjktYTE2ZjZjNTZiMDY2

    Folder ID:
    0B1iqp0kGPjWsNDg5NWFlZjEtN2IwZC00NmZiLWE3MjktYTE2ZjZjNTZiMDY2

    Caveat with folders requiring permission

    This technique works best for folders with public access. Folders that are shared only with certain Google accounts will cause trouble when you embed them this way. At the time of this edit, a message "You need permission" appears, with some buttons to help you "Request access" or "Switch accounts" (or possibly sign-in to a Google account). The Javascript in these buttons doesn't work properly inside an IFRAME in Chrome.

    Read more at https://productforums.google.com/forum/#!msg/drive/GpVgCobPL2Y/_Xt7sMc1WzoJ

提交回复
热议问题