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:

Has there been some change on this?

I just (earlier this week) installed the latest NextCloud version. I had all my contacts in an ownCloud but wanted to switch. In Thunderbird, I copied my ownCloud contacts to a local address book and that worked fine - everything was copied, including images.

Then I copied the contacts to the NextCloud, and it synched directly (Thunderbird synch, I have not set up desktop synch yet) but NOT the images.

Any ideas?

If you would have checked the referenced GitHub issue you had seen that the reported issue has been fixed already :wink:

Pictures are stored within the vcf record and not copied as separate files. If you’re running into a synchronization issue, please open a new report, provide information about your enviornment and and an example vcf file and how it looks like on the different systems.

Ah, it didn’t work so I figured it was not solved yet. I’ll try for a while and reproduce. But since photos on contacts and large uploads are my most important features and the webhost is not willing to help me with changing the setting, I’ll have no choice but to go back to OwnCloud, where those two did work… :confused: