我想在Google Cloud Endpoint中编写API,以便将图像上传到Google云端存储。 平台:Google Cloud Endpoint(Java) 后端连接,如数据库连接:Google Cloud Datastore。 另外,哪种数据类型用于上传图像?请帮帮我。
如果你进一步了解StackOverflow,你会发现人们建议不要通过端点来解决这个特殊情况。
对于Android,请参阅Uploading image from Android to GCS和upload image to google cloud storage with an application android。
由于您知道存储桶和文件名,因此上传文件的URL很容易扣除,请参阅以下文档以确定要使用的URL(取决于用户是否应进行身份验证,请参阅“用户被授予读取权限”一节对象“)https://cloud.google.com/storage/docs/cloud-console#_accessing