[Vtigercrm-developers] Vtiger 7.1 RC Released

nilay khatri nilay.spartan at gmail.com
Thu Feb 1 11:33:42 GMT 2018


Agree.

It should also support for the file fields in modules such as contact and
Product.

Quite feasible if the file could be sent in API request as Base64 encoded
value.

regards,
Nilay Khatri
Founder, Automate SMB
*Vtiger CRM implementation/Customization | Sales and Marketing Automation *


On Thu, Feb 1, 2018 at 4:49 PM, Alan Lord <alanslists at gmail.com> wrote:

> This is rather interesting...
>
> By the looks of the WebFormsModel, the WebServices API itself should now
> support the creation of Document records _with_ file attachments.
>
> Can you confirm this?
>
> Can you provide an example of how to do this?
>
> I can't see where you are retrieving the actual contents of the file, i.e.
> $_FILES['filename'][tmp_name]?
>
> I can't see where you are checking the mime_type either.
>
> 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?
>
>
> Thanks
>
> Al
>
>
> $uploadedFiles = $_FILES;
>> foreach ($uploadedFiles as $fileFieldName => $uploadedFile) {
>>     if (in_array($fileFieldName, $fileFieldsNameArray) &&
>> $uploadedFile['error'] == 0 && $uploadedFile['name']) {
>>                                         $data['notes_title'] =
>> $fileFieldsArray[$fileFieldName];
>>                                         $data['document_source'] =
>> 'Vtiger';
>>                                         $data['filename'] =
>> $uploadedFile['name'];
>>                                         $data['filelocationtype'] = 'I';
>>                                         $data['source'] = 'WEBFORM';
>>                                         $data['assigned_user_id'] =
>> $wsRecord['assigned_user_id'];
>>                                         $data['filestatus'] = 1;
>>                                         unset($_FILES);
>>                                         $_FILES['filename'] =
>> $uploadedFile;
>>                                         $record =
>> vtws_create('Documents', $data, $current_user); *<-- Here *
>>                                         array_push($createdDocumentRecords,
>> $record['id']);
>>                                 }
>>
>
>
> On 08/01/18 09:53, Satish Dvnk wrote:
>
>> Hi All,
>>
>> We would like to update you that Vtiger community edition *V7.1 RC* has
>> been published in sourceforge.net
>>
>
>  3. *Webform Attachments *(Allow user to attach files to web forms)
>>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180201/8024bd24/attachment-0001.html>


More information about the vtigercrm-developers mailing list