Import contacts with picture - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: Import contacts with picture (/showthread.php?tid=1588) |
Import contacts with picture - addady2 - 09-16-2019 Hi, In the CRM contact have picture field. I would like to import a lot of contacts with the pictures. Each contact have unique picture name in my disk directory. I found this document "How to update an image field from code" http://corebos.com/documentation/doku.php?id=en:devel:updateimagefield Look quit complicated :-( It there simpler way? RE: Import contacts with picture - joebordes - 09-16-2019 The code you reference can't be easier. Notice that in that example it is generating a QR code before saving and that is where all the work is. In your case you want to get the image from the file system and that is where your work is. it would be something like: PHP Code: <?php let us know how it goes RE: Import contacts with picture - addady2 - 09-17-2019 I manage to add contact + pic using the "coreBOS Web Service Developer Tool" Now I want to run it from linux cli. Its not clear to me from the doc what library should I include. Some example use: PHP Code: include_once('vtwsclib/Vtiger/WSClient.php'); other: PHP Code: include_once 'vtlib/Vtiger/Module.php'; RE: Import contacts with picture - joebordes - 09-18-2019 there are two ways to use web service. from outside corebos and from inside corebos WSClient outside means that it is a standalone application, you have to login to the webservice endpoint and use all the methods you need. this is a mobile app, a customer portal and similar applications that connect to corebos and use it as a database. vtlib/Vtiger/Module.php inside corebos means that you are programming inside the framework, you don't need to login because your script lives inside the corebos application, once you are inside you can use the web service methods normally without having to login (because you already are) |