[TYPO3-dam] Manually indexing files from own extension without BE-user

Uwe uwe at grohne.de
Thu Sep 7 17:45:47 CEST 2006


Hi there,
I'm currently writing an extension like dam_downloads, but with
upload functionality. For this, I want to use the indexing features
of DAM. So I tried uploading a file into the fileadmin-folder and
then index this file via DAM with the following code:


$file[md5(PATH_site.$newFilePath)] = PATH_site.$newFilePath;
//Index file	  require_once(PATH_txdam.'lib/class.tx_dam_indexing.php');
$index = t3lib_div::makeInstance('tx_dam_indexing');
$index->init();
$index->initEnabledRules();
$index->setRunType('auto');
$indexedFiles = $index->indexFiles($file, 18);

But when I'm not logged into the backend, I always get the error
in the log

"Attempt to modify table 'tx_dam' without permission"

(Don't know the exact words, cause I have it changed to german:
"Versuch Tabelle 'tx_dam' ohne Berechtigung zu modifizieren. (msg#1.2.1)")

When I'm logged into the backend, it works without problems.
Can I change this behaviour?

Thanks,

Uwe



More information about the TYPO3-project-dam mailing list