[imp] preview of attached files in imp

Petr Černík cernik at fel.cvut.cz
Sun Mar 3 23:17:31 UTC 2013


Quoting Gary <witscher at gmail.com>:

> Quoting cjdl01 <cjdl01 at brokensolstice.com>:
>
>> Quoting cjdl01 <cjdl01 at brokensolstice.com>:
>>
>>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>>
>>>> Quoting Petr ?erník <cernik at fel.cvut.cz>:
>>>>
>>>>> Hi all,
>>>>>
>>>>> i added in horde5 to mime_driver config file appropriate mime  
>>>>> type for docx and xlsx. It works very well for attached files in  
>>>>> incoming emails. But preview for attached files in compose  
>>>>> windows for docx/xlsx doesnt work (for doc/xls yes). It's a bug  
>>>>> or in compose windows (new mail) are used different functions or  
>>>>> settings?
>>>>>
>>>>> It says:
>>>>>
>>>>> Could not auto-determine data type.
>>>>
>>>> Exactly what the error message implies: IMP is unable to  
>>>> determine the content-type of the attachment so there is no way  
>>>> the appropriate viewer can be used.  This often happens because  
>>>> browsers won't report a content-type when attaching a file from  
>>>> the local system, so IMP is forced to try to auto-detect the  
>>>> contents (which does not work 100% of the time).
>>>>
>>>> michael
>>>
>>>
>>> Looks like I'm having this issue too.  All attachments have 100%  
>>> failure.  Is there anything we can do here Michael, to help imp  
>>> know what the attachment is?  I never had this issue in imp5, it  
>>> has only cropped up since the upgrade.  It occurs in Firefox,  
>>> Chrome, Internet explorer, Konqueror, Opera and Safari (on windows  
>>> and linux), so whatever the browser is supposed to be doing to  
>>> define the mime-type, none of them are doing it.  Is their some  
>>> package in pear or horde (or whatever) that horde uses to  
>>> determine the the content type? Maybe it needs reinstalling or  
>>> tweaking...
>>>
>>> Thanks.
>>>
>>> -Chris
>>
>> Okay... I have been poking around with this some more.  I noticed  
>> that my path to the magic db is set to /usr/share/misc/magic.  This  
>> is a directory on my Horde server, so it is valid in that sense.   
>> However, the directory it points to is empty.  I do not know if  
>> that is normal or not.  I also looked at /etc/magic, which is a  
>> file.  However, aside from a couple innocuous comments, the file is  
>> empty.  I likewise do not know if this is normal or not.
>>
>> But, despite this, magic seems to work as expected from the shell.   
>> It accurately guesses the file type of any file I throw at it.  But  
>> if I use the PHP shell in horde (with a context of either Horde or  
>> IMP), I get nothing, even after verifying that the file does exit,  
>> and that the mime type is correctly ascertained on the command line  
>> using the 'file' command.
>>
>> <?php
>> require_once 'MIME/Type.php';
>>
>> $filename = '/home/me/MyDocs/file.ext';
>> echo MIME_Type::autoDetect($filename);
>> ?>
>>
>> Returns Nothing.
>>
>>
>>
>> -- 
>> imp mailing list
>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
> On my ubuntu system the magic file is /usr/share/file/magic.mgc,  
> this is a compiled binary magic file. There is a link pointing to it  
> at /usr/share/misc/magic.mgc
>
> I'm using the latest imp and, although my attachment requirements  
> are limited to image files, I haven't had any issues. Are you sure  
> you have all the required php modules installed? Just a thought.

Doh ... shame.  U are rights. I mistyped character in name of  
magic.mgc. Thank you.

Best regards,

Petr Cernik

>
>
>
> -- 
> imp mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1848 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/imp/attachments/20130304/2a95e0a3/attachment-0001.bin>


More information about the imp mailing list