I want to write API in Google Cloud Endpoint for uploading image to Google Cloud Storage.
Platform : Google Cloud Endpoint (Java)
Backend connection like database connection : Google Cloud Datastore.
Also , Which data type is used for uploading image ?
Please help me for this.
Asked
Active
Viewed 873 times
0

Renaud Tarnec
- 79,263
- 10
- 95
- 121

tejashree mahadik
- 305
- 2
- 12
-
From which front end are you going to upload the image? Web browser? Android App? iOS App? – Renaud Tarnec Dec 07 '16 at 14:00
-
Android and iOS – tejashree mahadik Dec 08 '16 at 06:12
1 Answers
1
If you look further in StackOverflow 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.
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

Community
- 1
- 1

Renaud Tarnec
- 79,263
- 10
- 95
- 121
-
Hi , I could upload file from GCS. I also got public link for that image, however, what I want is 1. Will receive the image from IOS/Android app in the web service. 2. Store the image file into a bucket through GCE Java web service. 3. Access the image with specified URL. – tejashree mahadik Dec 09 '16 at 10:16
-
I understand that when you say "from IOS/Android app in the web service", by web service you mean "Google Endpoints". In other words you DO want to go through Google Endpoints for 1, 2 and 3. Am I right? – Renaud Tarnec Dec 09 '16 at 10:35
-
For iOS I cannot help you. You should search on SO or other sources on the web. – Renaud Tarnec Dec 12 '16 at 14:37