[ansel] Import pictures from folder structure

Samuel Wolf samuel_wolf at web.de
Wed Mar 7 13:55:14 UTC 2012


-----Ursprüngliche Nachricht-----
Von: "Michael J Rubinsky" <mrubinsk at horde.org>
Gesendet: 29.02.2012 18:05:10
An: ansel at lists.horde.org
Betreff: Re: [ansel] Import pictures from folder structure

>
>Quoting Samuel Wolf <samuel_wolf at web.de>:
>
>> What is wrong there?
>>
>> Schwerer Fehler:
>> Unbekannter Dateityp "/tmp/albums/kollegen/P1010028.JPG" kann nicht
>> verarbeitet werden.
>>  
>> 1. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:164
>> 2. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:640
>> 3. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:640
>> 4. Ansel::getImageFromFile() /usr/bin/ansel:621
>>  
>> ====================
>> root at mail:/tmp# file /tmp/albums/kollegen/P1010028.JPG
>> /tmp/albums/kollegen/P1010028.JPG: JPEG image data, EXIF standard 2.1
>>
>
>For some reason Horde_Mime_Magic doesn't think it's an image. You will
>have to track this down in ansel/lib/Ansel.php. In the
>getImageFromFile() method, add:
><code>
> var_dump($mime_type);
></code>
>
>after line 438, on the line before the if statement and post the
>results for that image.

There is no output.
Is the code of Ansel.php correct?

[...]
439        $image = array(
440            'image_filename' => basename($file),
441            'image_caption' => '',
442            'image_type' => $mime_type,
443            'data' => file_get_contents($file));
444
445        // Override the array e.g., if we're changing filename to something else.
---> var_dump($mime_type);
446        if (count($override)) {
447            $image = array_merge($image, $override);
448        }
[...]

Samuel


___________________________________________________________
Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.
https://produkte.web.de/freemail_mobile_startseite/


More information about the ansel mailing list