39aldo39 / Evolution-DecSync

Evolution plugin to sync contacts and calendars without a server using DecSync
Other
53 stars 5 forks source link

Images not transferred from android. #23

Open kocjs opened 4 years ago

kocjs commented 4 years ago

How to reproduce?

Create a contact with email address and an image on android (MotoX4 Lineage OS). Sync sync with Syncthing. Contact arrives without picture. (Debian Buster Evolution 3.30)

The other way around is working.

Thank you for this app.

39aldo39 commented 4 years ago

Thanks for the report! I have not looked at images yet, but I will take a look at it sometime.

kocjs commented 4 years ago

I am happy to help debug.

kocjs commented 4 years ago

This behavior might be related to the issue that people at etescync has. [https://github.com/etesync/etesync-dav/issues/65]

kocjs commented 4 years ago

VCards with pictures sync well beween the evolution and the radicale plugin. They get synced to android to. I future noted that the same vCards exported from evolution and cardbook have a size of 3.3mb, exported from android the size is only 4.6kb.

This vCard has been created with cardbook and and is exported trough evolution.

BEGIN:VCARD VERSION:3.0 UID:740bd10bbd4dcd8fd9b000eaa47e32aa4ed74b1b FN:11 N:;11;;; PHOTO;TYPE="X-EVOLUTION-UNKNOWN";ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ ... 4ll+Pynr7xP+j7zv+n7bv/w8og5WStdp3CwAAAABJRU5ErkJggg== TEL;TYPE=HOME,VOICE:9823984 X-EVOLUTION-FILE-AS:11 X-MOZILLA-HTML:FALSE END:VCARD

This with the android app and did not work.

BEGIN:VCARD VERSION:2.1 N:;11;;; FN:11 TEL;HOME:982-3984 PHOTO;ENCODING=BASE64;JPEG:/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwM ... zGLrNlxAuF//9k= END:VCARD

The main difference might be the photo encoding.

kocjs commented 4 years ago

In fact the issue is a wrong PHOTO header. Exactly as pointed out in https://github.com/owncloud/contacts/issues/425. If I change it, the import results with an image in evolution. After setting the VERSION:3.0 the .vcf is also imported into cardbook.

Expected behaviour the photo section of the contact should look like PHOTO;ENCODING=B;TYPE=JPEG:/9j/4AAQSkZJRg Actual behaviour the photo section looks like PHOTO;TYPE=image/jpeg:/9j/4AAQSkZJRg