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

Franz Koch typo at fx-graefix.de
Wed Sep 20 15:49:49 CEST 2006


Hi Uwe,

> 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)")

I currently try the same. The correct english error-message is:
---------
Attempt to insert record on page 'Media' (1) where this table, tx_dam, is not allowed (msg#1.1.11)
---------

> When I'm logged into the backend, it works without problems.
> Can I change this behaviour?
In my case it doesn't even work when I'm logged in as admin user :(
Is there any possibility to index files from FE.

-- 
Kind regards,
Franz Koch



More information about the TYPO3-project-dam mailing list