我想在谷歌 Cloud endpoints 编写API,将图像上传到谷歌 Cloud 存储 .平台:Google Cloud endpoints (Java)像数据库连接的后端连接:谷歌 Cloud 数据存储 .另外,使用哪种数据类型上传图像?请帮帮我 .
如果你进一步了解StackOverflow,你会发现人们建议不要通过 endpoints 来解决这个特殊情况 .
For Android ,见Uploading image from Android to GCS和upload image to google cloud storage with an application android .
由于您知道存储桶和文件名,因此上传文件的URL很容易扣除,请参阅以下文档以确定要使用的URL(取决于是否应对用户进行身份验证,请参阅第"A user is granted read access to an object"节)https://cloud.google.com/storage/docs/cloud-console#_accessing
1 回答
如果你进一步了解StackOverflow,你会发现人们建议不要通过 endpoints 来解决这个特殊情况 .
For Android ,见Uploading image from Android to GCS和upload image to google cloud storage with an application android .
由于您知道存储桶和文件名,因此上传文件的URL很容易扣除,请参阅以下文档以确定要使用的URL(取决于是否应对用户进行身份验证,请参阅第"A user is granted read access to an object"节)https://cloud.google.com/storage/docs/cloud-console#_accessing