enesser / vCards-js

Create vCards to import contacts into Outlook, iOS, Mac OS, and Android devices from your website or application.
MIT License
419 stars 154 forks source link

Attaching photo from Url #7

Closed fvisticot closed 9 years ago

fvisticot commented 9 years ago

Is the documentation always valid from your sample code ?

vCard.photo.attachFromUrl('https://avatars2.githubusercontent.com/u/5659221?v=3&s=460', 'JPEG');

I was thinking we can directly use: vCard.photo.url

Can you please clarify ?

enesser commented 9 years ago

As an alternative, you can also do the following:

vCard.photo.url = 'https://avatars2.githubusercontent.com/u/5659221?v=3&s=460'; vCard.photo.mediaType = 'JPEG';