Method: photo.startUpload
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
طلب HTTP
POST https://streetviewpublish.googleapis.com/v1/photo:startUpload
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال UploadRef
.
نطاقات التفويض
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/streetviewpublish
لمزيد من المعلومات، راجِع نظرة عامة على بروتوكول OAuth 2.0.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة 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)."]]