For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
$getID3 = FabrikWorker::getID3Instance();
$fileinfo = $getID3->analyze($pathToFile);
return ArrayHelper::getValue('playtime_seconds', $fileinfo, 'no data available');
$uploadPath = '{yourtable___upload_element}';
if (!empty($uploadPath)) {
$pathToFile = JPATH_ROOT . '/' . $uploadPath;
// rest of code goes here
}
$fileinfo = $getID3->analyze('/var/www/html/audio/example.mp3');
Hmm, not easy if you are using multiple Ajax upload. One of these days I'm going to add some built in analysis for audio and video, like we have for images (extracting location from EXIF data).Thanks.
Got it working now I think.
$getID3 = FabrikWorker::getID3Instance();
$uploadPath = '{audio___filepath}';
$path = JPATH_ROOT . $uploadPath;
$fileInfo = $getID3->analyze($path);
return $fileInfo['playtime_string'];
Re form submission, I've had a quick go at writing a script, but hit my wall. Part of the issue is that I am using ajax upload and using a join with the upload repeat table to show the individual files. Is this still possible?