相关疑难解决方法(0)

How to append write to google cloud storage file from app engine?

This deprecated API supports appending content to google cloud storage file:

FileWriteChannel FileService.openWriteChannel(AppEngineFile file,
                                boolean lock)
Run Code Online (Sandbox Code Playgroud)

But,

GcsOutputChannel GcsService.createOrReplace(GcsFilename filename,
                               GcsFileOptions options)
Run Code Online (Sandbox Code Playgroud)

doesn't seem so.

What is the solution here?

google-app-engine google-cloud-storage

13
推荐指数
2
解决办法
9048
查看次数

如何使用 Python 在追加模式下打开 GCS 存储桶中的文件?

我查看了所有相关问题,我能找到的只是上传到 GCS 而不是写作。我不是要上传文件或创建新文件。我需要以追加模式打开位于谷歌云存储桶中的文件,即如果它不存在则创建它并使用 python 写入它的末尾。如果有人能指出我正确的方向,我将不胜感激。上传方法每次都会替换我的文件。我试过下载、追加然后替换,但这要求文件最初存在于目录中。有没有办法在 gcs 中实现附加模式功能?

PS:我正在尝试在云功能中执行此操作,而不是配备 Cloud SDK 的机器

python file google-cloud-storage google-cloud-platform

5
推荐指数
1
解决办法
1980
查看次数