如何为 Contact.photos 指定 URL?

How do you specify URLs for Contact.photos?

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

我可以在哪里放置图像文件(例如,我可以将它放在 S3 上,或者在资源中随应用程序一起提供),URL 的正确格式是什么?

var contact = navigator.contacts.create();
contact.photos = [new ContactField('url', URL, true)];
contact.save()

这是您的答案....先生。

var photos = [];

var ImgUrl="images/Thomas.jpg";

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