是否可以使用Google Slides API和Python将本地图像添加到Slide中? [英] Is it possible to add local image to Slide using Google Slides API and Python?
问题描述
我想使用Python从本地图像中创建一个新幻灯片. 不幸的是,我没有看到上传本地图像的示例,仅通过
I want to create a new slides out of the local images using Python. Unfortunately, I do not see an example to upload a local image, only an image URL via the official documentation.
这就是为什么我想知道是否有可能做到这一点?如果可以的话,我将不胜感激.
That's why I'm wondering is it possible to do that at all? If it is I would appreciate any kind of help.
非常感谢您
推荐答案
摘自官方文档:
https://developers.google.com/slides/how-tos/add-image
如果要将私人或本地图像添加到幻灯片,则首先需要将其提供给可公开访问的URL.一种选择是将图像上传到Google Cloud Storage,并使用带有15分钟TTL的签名URL.上载的图片会在15分钟后自动删除.
If you want to add private or local images to a slide, you'll first need to make them available on a publicly accessible URL. One option is to upload your images to Google Cloud Storage and use signed URLs with a 15 minute TTL. Uploaded images are automatically deleted after 15 minutes.
这篇关于是否可以使用Google Slides API和Python将本地图像添加到Slide中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!