Hi Sander,

Yes, it helps a lot, thanks.

I inserted this code:

var myReader = new FileReader();
myReader.onload = function (event) { 
console.log("myReader.result",JSON.stringify(myReader.result)); 
};
myReader.readAsText(new Blob([JSON.stringify(this.importContext)], { type: 
"application/json" }), "import-context");
It displays:

myReader.result 
"{\"multiple\":false,\"createUpdate\":null,\"createMissingBundles\":false,\"createMissingMessages\":false}"

As for using a raw string I did it with exactly the same result.

Many thanks for your help and support.

Nicolas

Le vendredi 15 septembre 2017 14:49:24 UTC+2, Sander Elias a écrit :
>
> Hi Nicolas,
>
> Can you assign the blob to a var and inspect it? something strange is 
> happening. Did you try it with a raw sting yet?
> here is a snippet on how to log a blob!
> var myReader = new FileReader(); 
> myReader.onload = function(event){ console.log(JSON.stringify(myReader.
> result)); }; 
> myReader.readAsText(myBlob);
>
> like:
> event.formData.append("import-context", new Blob([
> `{"multiple":false,"createUpdate":null,"createMissingBundles":false,"createMissingMessages":false}`
> ], { type: "application/json"}),"import-context");
>
> Hope this helps a bit.
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to