https://developers.google.com/photos/library/guides/resumable-uploads
我使用google api可恢复上传,并将类型设置为“ image / heif”。 上传后,我可以在iPhone应用程序上看到“实时照片”按钮。 但它们仅显示静态照片,没有实时照片视频。 有人知道吗?
标题开始:
$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)
];
标题块:
$arrSetHeaders = [
'Authorization: '.$token,
'Content-Length: '.strlen($buffer),
'X-Goog-Upload-Command: upload',
'X-Goog-Upload-Offset: '.$offset,
];
第一个和最后一个响应:
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)