shaozi / ldap-authentication

🔐🔐🔐 A simple Nodejs Async LDAP authentication library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thumbnailPhoto

SoloEgo opened this issue · comments

commented

Hi, ive tried to get user thumbnailPhoto, but in response i get "����\x00\x10JFIF\x00\x01\x01\x01\x00\x00\x00\x00��\...", its a bit weird... How i can get base64 string or somthig like this?

It probably is a binary string. you can try btoa(s)

thumbnailPhoto is binary, so a simple base64encode() should be enough. Note that those thumbnails are usually stored as JPEG (image/jpeg), but I would recommend using an MIME library to get the correct MIME type for the binary string.

commented

Yep, added check attribute in function in index.js and it work properly, many thanks