[TYPO3-dev] How to recover the real image path from a flexformrecord ?

Steffen Kamper steffen at sk-typo3.de
Tue Oct 23 13:55:13 CEST 2007


"Alban Cousinié" <ace at mind2machine.com> schrieb im Newsbeitrag 
news:mailman.3008.1193140248.20721.typo3-dev at lists.netfielders.de...
Hi all,

I have developped the extension tv_xml_for_flash which reads the page and
flexform data and outputs it to XML so Typo3 can also be used as a backend
for Flash websites.

However I am having huge troubles figuring how to rewrite image paths to
their real location.

The prblem is when an image which would be located at
fileadmin/ressources/images/cover_02.jpg is inserted into a flexform, it is
recorded in the tx_templavoila_flex field of the tt_content row as :
<field index="field_imgsrc">
       <value index="vDEF">cover_02.jpg</value>
</field>

As you see, the whole relative path leading to the file has been stripped.

I have seen there were entries with some complete file paths in the
sys_refindex table, but I can't find out any field with a direct relation to
my tt_content object, or I'mm missing out something.

So far I have been recovering my images path using the following request
SELECT * FROM sys_refindex WHERE ref_string LIKE '%cover_02.jpg'

But this method has proven to be very unreliable and it could return the
path to several files if they have the same name but different paths.

Does anyone know a reliable method for recovering the missing path to the
file ?

Regards,

Alban Cousinié

Hi Alban,

you normally configure the uploadfolder in Flexform. If it's a browse 
result, you could read the uploadfolder from TCA.

vg  Steffen






More information about the TYPO3-dev mailing list