0

https://developers.google.com/photos/library/guides/resumable-uploads

I use the google api Resumable upload, and set type 'image/heif'. I can see 'Live photo' button on my iPhone app after uploaded. But they're only static photo shown, no live photo video. Does anyone know?

Header Start:

$arrSetHeaders = [      
    'Authorization: '.$token,
    'Content-Length: 0',
    'X-Goog-Upload-Command: start', 
    'X-Goog-Upload-Content-Type: '.mime_content_type($path.$file),
    'X-Goog-Upload-File-Name: '.$file,
    'X-Goog-Upload-Protocol: resumable',
    'X-Goog-Upload-Raw-Size: '.filesize($path.$file)
];

Header Chunks:

$arrSetHeaders = [
    'Authorization: '.$token,
    'Content-Length: '.strlen($buffer),
    'X-Goog-Upload-Command: upload',
    'X-Goog-Upload-Offset: '.$offset,           
];

Response First & Last:

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
X-GUploader-UploadID: XXXXXXXXXX
X-Goog-Upload-Status: active
X-Goog-Upload-URL: https://photoslibrary.googleapis.com/v1/uploads?upload_id=XXXXXXXX&upload_protocol=resumable
X-Goog-Upload-Control-URL: https://photoslibrary.googleapis.com/v1/uploads?upload_id=XXXXXXXX&upload_protocol=resumable
X-Goog-Upload-Chunk-Granularity: 262144
Content-Length: 0
Date: Mon, 29 Jul 2019 10:32:34 GMT
Server: UploadServer
Content-Type: text/html; charset=UTF-8
Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
X-GUploader-UploadID: XXXXXXXX
X-Goog-Upload-Status: final
Content-Type: text/plain
Content-Length: 872
Date: Mon, 29 Jul 2019 10:32:38 GMT
Server: UploadServer
Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"

XXXXXXXXXXX (uploadToken)

GGM
  • 1
  • 2

0 Answers0