Thanks you so much for your answer, is very useful have a people like you
that help us.
Well, I have an angularjs app. Inside it I have a javascript code that call
my gAPI (endpoint). The code is something like this:
function uploadImage(nombre, raw){
var urlImage;
gapi.client.helloworld.imagenes.uploadImage({'name':nombre,
'image':raw}).execute(function(resp) {
urlImage=resp.message;
});
return urlImage;
};
And after i have other call to api to send complete data of user with the
image url.
I know that I could have a function that loading all data of user (included
the photo profile) but I have the code as well .Finally I've got the goal,
calling the second call inside of first and it works right, but I would
like know how make this correctly.
Thanks for all and sorry for my dreadful english.
El miércoles, 13 de abril de 2016, 21:52:32 (UTC+2), Nicholas (Google Cloud
Support) escribió:
>
> Thanks for posting your questions here! You mentioned that this is
> something you are trying to accomplish in Javascript. If I understand your
> task correctly, you would like to perform the following:
>
> - Call gAPI function to send image to server
> - When gAPI call returns a URL (likely where the image can be found),
> provide URL to the user
> - Save the complete data to the user
>
> To help with this, it would be helpful if you could clarify a few things:
>
> - Where is the Javascript executing? (in browser using XMLHttpRequest
> or Nodejs using the http package)
> - Is the provided URL required for the complete save?
> - Where is each part of this code executing (client device / App
> Engine servers)?
>
> Knowing the above should help us get more specific information to
> determine the best course of action for you.
>
> On Wednesday, April 13, 2016 at 4:23:34 AM UTC-4, Juan Antonio Fernández
> Sánchez wrote:
>>
>> I have found a problem with GAE Cloud Endpoints when I try calling a
>> function and I need the result of this function to other call.
>> I know that I could resolve this problem to other way, but I want
>> understand how I can do this.
>> This is the summary, working in JavaScript.
>> I call to a gapi function to send an image to Server, when the process
>> to save finish, it return an url and i use this url to save the complete
>> data to user.
>>
>> The problem is that the users data always is saved before than the
>> response arrive and it is saved without url that I need because the second
>> call don't wait to first call.
>>
>>
>> I have tried to use callbacks and other tools but I don't find the way.
>>
>> Somebody had been the same problem? Thanks you.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/5c5af72e-eba3-4f27-84f8-c167794a02f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.