Hello,
I'm currently learning to develop for Omeka, and starting to get familiar with the hook system.
I must run a script to convert some some files after they are added to an item.
For this, I added this code to after_ingest_file :
$token = pathinfo($file['file']->filename, PATHINFO_FILENAME);
$rapport = pathinfo($file['file']->original_filename, PATHINFO_FILENAME);
$command = "/opt/www/pdf/pdffiletohtml.sh $token $rapport > /dev/null &";</p>
<p> _log("After ingest file : $command");
exec ($command, $y);
It's called correctly and the script does its job when executed from the command line.
But when it's called from Omeka, the converted files are not created.
I suspect it's because the file is not yet added to the filesystem when the hook fires.
Here's my question : where do I have to put this code for it to be executed at the right time ?
Thanks