[Typo3] access $_FILES in the frontend and more...
Andreas Bulling
spam at phoenix.hadiko.de
Fri Oct 28 12:44:21 CEST 2005
Hi everybody,
I've searched some time for an answer but I found only one and no longer
functional reference to the mailinglist archive covering only one of my questions.
They are formulated quite fast:
1) What is the _correct_ way to access the $_FILES array with php/typo3 functions
in a frontend extension? I would like to implement an image upload where the image
should be saved in the DB. That leads to my second question:
2) What is the _correct_ way to save/read an image to/from the DB especially that
thumbnails are displayed for the images in the backend?
I've found the following so far:
$imagedata = base64_encode( fread( fopen( $_FILES['image']['tmp_name'], "r" ), $_FILES['image']['size'] ) );
I would save $imagedata in a BLOB field in the DB.
3) How can I change the format of the generated links using the pi_linkTP_keepPIvars() function?
Normally they are of the type tx_extensionabbr_pi1[var]=value.
I would like to have var=value.
Thanks in advance,
Andreas
More information about the TYPO3-english
mailing list