<div dir="ltr">Agree.<div><br></div><div>It should also support for the file fields in modules such as contact and Product.</div><div><br></div><div>Quite feasible if the file could be sent in API request as Base64 encoded value.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">regards,<div>Nilay Khatri</div><div>Founder, Automate SMB</div><div><i style="font-size:x-small">Vtiger CRM implementation/Customization | Sales and Marketing Automation </i><br></div><div><br></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Feb 1, 2018 at 4:49 PM, Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is rather interesting...<br>
<br>
By the looks of the WebFormsModel, the WebServices API itself should now support the creation of Document records _with_ file attachments.<br>
<br>
Can you confirm this?<br>
<br>
Can you provide an example of how to do this?<br>
<br>
I can't see where you are retrieving the actual contents of the file, i.e. $_FILES['filename'][tmp_name]?<br>
<br>
I can't see where you are checking the mime_type either.<br>
<br>
It looks like you are using the $_FILES super-global so this implies (I think) that the file must be POSTed to the server for it to be available. Could we use this with the "server api", e.g. local calls to vtws_... functions? These calls don't use POST do they?<br>
<br>
<br>
Thanks<br>
<br>
Al<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$uploadedFiles = $_FILES;<br>
foreach ($uploadedFiles as $fileFieldName => $uploadedFile) {<br>
    if (in_array($fileFieldName, $fileFieldsNameArray) && $uploadedFile['error'] == 0 && $uploadedFile['name']) {<br>
                                        $data['notes_title'] = $fileFieldsArray[$fileFieldNam<wbr>e];<br>
                                        $data['document_source'] = 'Vtiger';<br>
                                        $data['filename'] = $uploadedFile['name'];<br>
                                        $data['filelocationtype'] = 'I';<br>
                                        $data['source'] = 'WEBFORM';<br>
                                        $data['assigned_user_id'] = $wsRecord['assigned_user_id'];<br>
                                        $data['filestatus'] = 1;<br>
                                        unset($_FILES);<br>
                                        $_FILES['filename'] = $uploadedFile;<br>
                                        $record = vtws_create('Documents', $data, $current_user); *<-- Here *<br>
                                        array_push($createdDocumentRec<wbr>ords, $record['id']);<br>
                                }<br>
</blockquote><span class="">
<br>
<br>
On 08/01/18 09:53, Satish Dvnk wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
We would like to update you that Vtiger community edition *V7.1 RC* has been published in <a href="http://sourceforge.net" rel="noreferrer" target="_blank">sourceforge.net</a> <br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 3. *Webform Attachments *(Allow user to attach files to web forms)<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>