Dray
Dray

Reputation: 1

draft update with big Attachment by resumable upload return 404

my draft with big Attachment.

  1. create draft with gapi.
  2. update this draft add some big file.
  3. upload draft rawdata by resumable upload.
  4. when i start a resumable session, it return 404.
Array
(
    [url] => https://www.googleapis.com/resumable/upload/gmail/v1/users/me/drafts/r3718017142990379914
    [method] => post
    [http_header] => Array
        (
            [0] => Authorization: Bearer ya29.****
            [1] => Content-type: application/json
            [2] => X-Upload-Content-Type: message/rfc822
        )
    [response] => HTTP/1.1 200 Tunnel established

HTTP/1.1 404 Not Found
X-GUploader-UploadID: AEnB2Up-CJW9XP4E84DqWjZhI_8-YFgWR47UNNfqGkmM2S5EBf3H5aGOcuwHzLd-4faoKAxd_qgaO5GInDUiJx6uua8JDwj4X0yLamxA--WySFB3ZZxw7YQ
Vary: Origin
Vary: X-Origin
Content-Type: text/html; charset=UTF-8
Content-Length: 9
Date: Fri, 18 Aug 2017 12:48:24 GMT
Server: UploadServer
Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"

Not Found
    [res_header] => HTTP/1.1 200 Tunnel established
    [res_body] => HTTP/1.1 404 Not Found
X-GUploader-UploadID: AEnB2Up-CJW9XP4E84DqWjZhI_8-YFgWR47UNNfqGkmM2S5EBf3H5aGOcuwHzLd-4faoKAxd_qgaO5GInDUiJx6uua8JDwj4X0yLamxA--WySFB3ZZxw7YQ
Vary: Origin
Vary: X-Origin
Content-Type: text/html; charset=UTF-8
Content-Length: 9
Date: Fri, 18 Aug 2017 12:48:24 GMT
Server: UploadServer
Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"

Not Found
    [errno] => 0
    [error] =>
)

so, is the draft can not edited using a resumable upload?

How can I edit a draft with a large attachment?

Upvotes: 0

Views: 71

Answers (1)

Dray
Dray

Reputation: 1

when you update draft, it must used put.

like: PUT https://www.googleapis.com/upload/gmail/v1/users/me/drafts/r6052444812129220058

Upvotes: 0

Related Questions