且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将图像/视频从Android/iOS发送到Google Cloud Endpoints

更新时间:2022-10-31 20:32:09

正如Saiyr所建议的那样,您应该直接从Android应用程序上传到Cloud Storage(不要通过Endpoints).请参见从Android将图像上传到GCS

As Saiyr suggested, you should upload directly to the Cloud Storage from the Android application (without going through Endpoints). See Uploading image from Android to GCS and upload image to google cloud storage with an application android.

由于您知道存储段和文件名,因此可以轻松扣除上载文件的URL,请参阅以下文档来确定要使用的URL(取决于是否对用户进行身份验证,请参阅用户被授权授予对对象的读取权限") https://cloud.google.com/storage/docs/cloud-console#_accessing

Since you know the bucket and file name, the URL of the uploaded file is easily deductible, see the following documentation to decide which URL to use (depending on whether the user shall be authenticated or not, see Section "A user is granted read access to an object") https://cloud.google.com/storage/docs/cloud-console#_accessing