我们可以使用签名 URL 在 google 云存储中进行可恢复上传吗?

Can we do resumable upload in google cloud storage using signed URL?

我想在 GCS 中为可恢复上传实现签名 URL,但问题是当我使用签名 URl 时,哪种类型的 http 方法(PUT,POST,GET ..) 需要用于创建 "uploadId",以及在可恢复上传中使用 url 获取 "uploadId" 时我必须用于此问题和相同问题的内容。

我已经完成了使用 oAuth 令牌的教程,但我只想通过 Signed URL 完成。

请参阅文档 Signed URLs 部分的注释:

Note: If your users are only uploading resources (writing) to an access-controlled bucket, you can use the resumable uploads functionality of Google Cloud Storage, and avoid signing URLs or requiring a Google account. In a resumable upload scenario, your (server-side) code authenticates and initiates an upload to Google Cloud Storage without actually uploading any data. The initiation request returns an upload ID, which can then be used in a client request to upload the data. The client request does not need to be signed because the upload ID, in effect, acts as an authentication token. If you choose this path, be sure to transmit the upload ID over HTTPS.

是的,您可以使用签名网址。开始可恢复上传的初始调用(POST)需要签名,其余调用不需要签名,只需要上传 ID。

或者,如 jterrace 所建议,您可以从服务器创建初始 POST 并将上传 ID 传递给客户端。