Method: photo.startUpload
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
درخواست HTTP
POST https://streetviewpublish.googleapis.com/v1/photo:startUpload
URL از دستور GRPC Transcoding استفاده می کند.
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از UploadRef
است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/streetviewpublish
برای اطلاعات بیشتر، به نمای کلی OAuth 2.0 مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eInitiates an upload session to facilitate uploading photo bytes using the returned UploadRef.\u003c/p\u003e\n"],["\u003cp\u003eUploaded photos must meet specific requirements, including Photo Sphere XMP metadata and size specifications.\u003c/p\u003e\n"],["\u003cp\u003eUpon completion, the UploadRef is utilized with photo.create to generate the Photo object entry.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty for the POST request to \u003ccode\u003ehttps://streetviewpublish.googleapis.com/v1/photo:startUpload\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes how to start uploading photo bytes for Street View. It involves creating an upload session using a POST request to `https://streetviewpublish.googleapis.com/v1/photo:startUpload` with an empty request body. The response returns an `UploadRef` URL, which is used to upload the photo bytes. The photo needs Photo Sphere XMP metadata and must meet Google Maps' size requirements, including being a full 360-degree panorama. Finally use the `UploadRef` with `photo.create` to finalize. The process requires OAuth scope `https://www.googleapis.com/auth/streetviewpublish`.\n"],null,["# Method: photo.startUpload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates an upload session to start uploading photo bytes. The method uses the upload URL of the returned [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) to upload the bytes for the [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\nIn addition to the photo requirements shown in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, the photo must meet the following requirements:\n\n- Photo Sphere XMP metadata must be included in the photo metadata. See \u003chttps://developers.google.com/streetview/spherical-metadata\u003e for the required fields.\n- The pixel size of the photo must meet the size requirements listed in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, and the photo must be a full 360 horizontally.\n\nAfter the upload completes, the method uses [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) with [photo.create](/streetview/publish/reference/rest/v1/photo/create#google.streetview.publish.v1.StreetViewPublishService.CreatePhoto) to create the [Photo](/streetview/publish/reference/rest/v1/photo#Photo) object entry.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photo:startUpload`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]