I want to write API in google cloud endpoint for uploading image to google cloud storage.
Platform : Google cloud end point (Java)
Backend connection like database connection : google cloud datastore.
Also , Which data type is used for uploading image ? Please help me for this.
我想在谷歌云端点编写API,将图像上传到谷歌云存储。平台:谷歌云端点(Java)后端连接,如数据库连接:谷歌云数据存储。另外,使用哪种数据类型上传图片?请帮帮我。
1 个解决方案
#1
1
If you look further in * you will find that people advise not going through Endpoints for this particular case.
如果你进一步了解*,你会发现人们建议不要通过端点来解决这个特殊情况。
For Android, see Uploading image from Android to GCS and upload image to google cloud storage with an application android.
对于Android,请参阅将图像从Android上传到GCS,并使用应用程序android将图像上传到谷歌云存储。
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
由于您知道存储桶和文件名,因此上传文件的URL很容易扣除,请参阅以下文档以确定要使用的URL(取决于是否应对用户进行身份验证,请参阅“用户被授予读取权限”一节到一个对象“)https://cloud.google.com/storage/docs/cloud-console#_accessing
#1
1
If you look further in * you will find that people advise not going through Endpoints for this particular case.
如果你进一步了解*,你会发现人们建议不要通过端点来解决这个特殊情况。
For Android, see Uploading image from Android to GCS and upload image to google cloud storage with an application android.
对于Android,请参阅将图像从Android上传到GCS,并使用应用程序android将图像上传到谷歌云存储。
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
由于您知道存储桶和文件名,因此上传文件的URL很容易扣除,请参阅以下文档以确定要使用的URL(取决于是否应对用户进行身份验证,请参阅“用户被授予读取权限”一节到一个对象“)https://cloud.google.com/storage/docs/cloud-console#_accessing