[ansel] "import" and "add" with the "ansel/bin/ansel" script is throwing errors

Michael J Rubinsky mrubinsk at horde.org
Wed Sep 11 16:22:23 UTC 2013


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Martin Vieregge-Heyng <mvh at ferroxon.de>:
>
>> Hi Horde/Ansel-team!
>>
>> I need to make use of the remote API via the "ansel/bin/ansel"  
>> H5-script. Therefore made some tests and found that the comands  
>> "list" and "create" are working as expected. "import" and "add" are  
>> throwing a "Fatal Error":
>>
>> ---snip---
>> server:/usr/share/php5/PEAR/www/horde/ansel/bin # ./ansel -u xxxx  
>> -p secret --file='/home/xxxx/oven.jpg' -g=5 add
>> Logged in successfully as "xxxx".
>>
>> ====================
>>
>> Fatal Error:
>> Can't get unknown file type "/home/mvh/oven.jpg".
>> In /usr/share/php5/PEAR/www/horde/ansel/lib/Ansel.php on line 445
>>
>> 1. Ansel_Cli_Helper_Local->add()  
>> /usr/share/php5/PEAR/www/horde/ansel/bin/ansel:191
>> 2. Ansel::getImageFromFile()  
>> /usr/share/php5/PEAR/www/horde/ansel/bin/ansel:715
>>
>> ====================
>> ---snap---
>>
>> Is this a problem of my installation/config.php? Uploading via  
>> Horde/Ansel webinterface is working as expected. Mime database  
>> "Magic" is set correctly in the horde/config. Didn't test the  
>> "reset" and "exif" comands up to now.
>
> This error is thrown when Horde_Mime_Magic::analyzeFile() returns a  
> mime type that is not an image type. You can try running the  
> following command in the phpshell in the Horde administrative menu:
>
> var_dump(Horde_Mime_Magic::analyzeFile('/path/to/file.jpg','/path/to/mime_magic_db'));

Another possibility is that since you are using this to upload to a  
remote system, the local machine that you are using to execute the  
ansel cli script does not have the mimemagic database setup correctly.
-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/ansel/attachments/20130911/669265d6/attachment.bin>


More information about the ansel mailing list