<div dir="ltr"><div><div>Hi Alan,<br><br></div>It should be passed an an parameter to api as shown below.<br><br>function uploadAndSaveFile($id, $module, $file_details, $attachmentType='Attachment') {<br><br></div>Source will be updated soon.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 6:17 PM, ptdesigner <span dir="ltr"><<a href="mailto:ptdesigner@gmail.com" target="_blank">ptdesigner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div>That's the change that don't let me upload company logo anymore.</div><br><br>-------- Mensagem original --------<br>De : Alan Lord <<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>> <br>Data: 16/10/2015 13:33 (GMT+00:00) <br>Para: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a> <br>Assunto: [Vtigercrm-developers] 6.4.0 change to CRMEntity.php? <br><div><div class="h5"><br>In 6.4.0 is this new chunk of code at line 140:<br><br>> $save_file = 'true';<br>> //only images are allowed for Image Attachmenttype<br>> $mimeType = mime_content_type($file_details['tmp_name']);<br>> $mimeTypeContents = explode('/', $mimeType);<br>> // For contacts and products we are sending attachmentType as value<br>> if ($attachmentType == 'Image' || ($file_details['size'] && $mimeTypeContents[0] == 'image')) {<br>> $save_file = validateImageFile($file_details);<br>> }<br>> if ($save_file == 'false') {<br>> return false;<br>> }<br><br>Note the test line:<br><br>> if ($attachmentType == 'Image' || ($file_details['size'] && $mimeTypeContents[0] == 'image')) {<br><br>I just searched the whole CRMEntity.php file and can't find <br>$attachmentType *anywhere* else in the file... Is that correct?<br><br>Al<br><br>_______________________________________________<br><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></div></div></div><br>_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>
</div>