How do you specify the urls for Contact.photos?

https://github.com/apache/cordova-plugin-contacts#contact

Where can I put the image file (for example, can I get it on S3 or upload it with the application to the resources) and what is the correct format for URL?

var contact = navigator.contacts.create();
contact.photos = [new ContactField('url', URL, true)];
contact.save()
+4
source share
1 answer

This is your answer .... Sir.

var photos = [];

var ImgUrl="images/Thomas.jpg";

photos[0] = new ContactField('url', ImgUrl,true);
contact.photos = photos; 
+1
source

All Articles