Caldavsynchronizer and images?

Hi,

I use caldavsynchronizer to Connect nextcloud contacts with Outlook contacts. That works fine without Images. If I add an Image to the contact in nextcloud the Sync fails.

Any Idea?

Best regards
Namtscho

Export a contact to a vcf file in Outlook and check which vcf version is used and how the contact image is stored. Usually the image should be include using the PHOTO tag, like this:

PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgA ...

Is there any more detailed error displayed when it fails? Have you checked the Nextcloud log file for any related error messages?

Sorry, misunderstanding

The Error-Log in caldavsynchronizer said:

/remote.php/dav/addressbooks/users/user1/contacts/a3520c99-daa3-4aa3-8bb1-8bd437a7c2b5.vcf System.UriFormatException: Ungültiger URI: Das URI-Format konnte nicht bestimmt werden. bei System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) bei System.Uri..ctor(String uriString) bei Thought.vCards.vCardStandardReader.ReadInto_PHOTO(vCard card, vCardProperty property) bei Thought.vCards.vCardStandardReader.ReadInto(vCard card, vCardProperty property) bei Thought.vCards.vCardStandardReader.ReadInto(vCard card, TextReader reader) bei CalDavSynchronizer.Implementation.Contacts.CardDavRepository`1.Deserialize(String vcardData, vCardStandardReader serializer) bei CalDavSynchronizer.Implementation.Contacts.CardDavRepository`1.TryDeserialize(String vcardData, vCard& vcard, WebResourceName uriOfAddressbookForLogging, vCardStandardReader deserializer, ILoadEntityLogger logger) false false

In caldavsyncronizer I see this raw data from nextcloud:

BEGIN:VCARD
VERSION:3.0

PHOTO;ENCODING=b;TYPE=jpeg;VALUE=URI:/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAYEBA QFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHCAgICAgI

The export vcf from outlook:

BEGIN:VCARD
VERSION:2.1

X-MS-CARDPICTURE;TYPE=JPEG;ENCODING=BASE64:

Seems to me like a problem with the different vcard-versions.

Best regards

Zusammenfassung

Dieser Text wird versteckt

I think the syntax of the PHOTO tag is invalid in this case, because URI requires a link to an image file and not the binary data.

I had opened an issue ticket a couple of days ago, because I realized that uploading an image in the Contacts app causes exactly the described syntax problem. I worked around this problem by using Thunderbird to update the image instead of using the upload function in the Contacts app.

Thank you for the info. Lets see what happens… :wink: