0
Google Cloud Storage JSON APIを使用して再開可能なセッションURIを生成しようとしています。 docs以下の私は、必要な引数が Google Cloud Storageで再開可能なアップロードセッションURLリクエスト
curl \
-X POST \
-H "Content-Length: 1000000" \
-d "uploadType=resumable&name=cat.jpg" \
https://www.googleapis.com/upload/storage/v1/b/my-bucket/o
これだけの時間を満たすために一緒に、次のcurlコマンドを置いていると、サーバーが応答しません。
Content-Type
は、ファイルメタデータを送信する場合にのみ必要です。私もメタデータと関連データを追加しようとしましたが、これも失敗します。
ドキュメント内のリクエスト例では、手順に記載されていないAuthorization: Bearer [YOUR_AUTH_TOKEN]
ヘッダーがあります。私はまた、アプリのapiキーを使用して、これを追加しようとしましたが、これもタイムアウトします。
バケットのACLが書き込み可能なすべてのユーザーに設定されています。 CORSは設定されていません。
誰かが間違っていると指摘できますか?
カール冗長出力はだから私はこの今働いている
* Hostname was NOT found in DNS cache
* Trying 216.58.208.138...
* Connected to www.googleapis.com (216.58.208.138) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-ECDSA-AES128-GCM-SHA256
* Server certificate:
* subject: C=US; ST=California; L=Mountain View; O=Google Inc; CN=*.googleapis.com
* start date: 2017-10-24 08:38:00 GMT
* expire date: 2017-12-29 00:00:00 GMT
* subjectAltName: www.googleapis.com matched
* issuer: C=US; O=Google Inc; CN=Google Internet Authority G2
* SSL certificate verify ok.
> POST /upload/storage/v1/b/aits-resumables-test/o HTTP/1.1
> User-Agent: curl/7.35.0
> Host: www.googleapis.com
> Accept: */*
> Content-Length: 1000000
> Content-Type: application/json; charset=UTF-8
>
* upload completely sent off: 33 out of 33 bytes