[英]Create edit link for google drive files in ruby
我使用 ruby 的“google_drive”gem。 我可以在 ruby 中創建一個列表 google 驅動器文件。 有沒有辦法將權限設置為 {type: 'anyone', role: 'writer'} 並在 ruby 中創建一個鏈接來查看或編輯我創建的谷歌驅動器文件?
謝謝, 安德烈亞斯
您沒有具體說明您是如何創建文件的,但文件的每個實例都有一個#human_url
- 這是文件的鏈接,允許您在 web 瀏覽器中查看或編輯文件。
樣本:
session = GoogleDrive::Session.from_config("config.json")
session.upload_from_file("/path/to/hello.txt", "hello.txt", convert: false)
file_url = session.file_by_title("hello.txt").human_url
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.