Streaming Google storage upload
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 google-cloud-ruby issue #1997 中描述的限制,并检查链接的 gcs_stream_upload wrapper,以其 streaming 示例作为起点。当 Google storage 上传能够写入流式传输的数据而无需将完整内容保留在内存中(包括通过 IO.copy_stream 生成的数据)时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I am trying to solve the case of uploading files in a streaming fashion without keeping the full contents in memory
I have previously implemented the same feature in https://github.com/aws/aws-sdk-ruby/pull/1711
As identified in https://github.com/googleapis/google-cloud-ruby/issues/1997
There are some limitations in google-api-client which hard codes the use of the content length header
I have written a minimal wrapper library that monkey patches it here which should serve as a good source of inspiration: https://github.com/Fonsan/gcs_stream_upload
require 'gcs_stream_upload'
storage = Google::Cloud::Storage.new(timeout: 5 * 60)
bucket = storage.bucket('bucket')
gcs_stream_upload = GCSStreamUpload.new(bucket)
gcs_stream_upload.upload('object') do |io|
IO.copy_stream(IO.popen('yes | head -n 10'), io)
end
# => Written "y\n" * 10
gcs_stream_upload.upload('object') do |io|
io << 'data'
io << 'dat2'
end
# => Written "datadat2"
- 主要语言
- Ruby
- 星标
- 2.9k
- 派生
- 888
- 平均合并
- 8 分钟
- 30 天内合并 PR
- 242
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-api-ruby-client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
googleapis/google-api-ruby-client#28001 · 5 个 reaction ·
维护者通常 1 天内回复
-
googleapis/google-api-ruby-client#27757 · 已指派 1 人 ·
维护者通常 1 天内回复
-
google-apis-core: CompositeIO does not maintain the IO read contract可能已有人在做 @torreypayne 于 4 天前认领。 未关闭
googleapis/google-api-ruby-client#27758 · 已指派 1 人 ·
维护者通常 1 天内回复
-
google-apis-core: singular PagedResults ignores max可能已有人在做 @torreypayne 于 4 天前认领。 未关闭
googleapis/google-api-ruby-client#27759 · 已指派 1 人 ·
维护者通常 1 天内回复
-
api: storage type: feature request
难度 3/5 1-2 天 新手友好度 55/100
googleapis/google-api-ruby-client#27339 ·
维护者通常 1 天内回复
查看 googleapis/google-api-ruby-client 的全部 Issue
相似的 Issue
-
security
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
solana-foundation/pay-kit#341 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
julienXX/terminal-notifier#333 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
serhii-londar/open-source-mac-os-apps#1419 ·
维护者通常 5 天内回复