[Typo3-dev] API functions/variables for uploading files

Bernhard Kraft kraftb at kraftb.at
Sat Sep 3 22:22:41 CEST 2005


Saurabh Nanda wrote:
> Hi,
> 
> I am writing a form (to be used in the frontend) which will allow the
> user to upload an image file (a logo).
> 
> When the form is submitted, only the filename is available in
> $this->piVars array. From where can I access the uploaded file?
> 
> Also, are there any API functions that can make this whole process easier?

The filename like it was named on the client-side and also the mimetype, 
again the temporary name and the size can be read from the superglobal 
PHP variable:
$_FILES

This is already handles in t3lib/class.t3lib_extfilefunc.php by the 
method: func_upload ...

But AFAIK this is intended for BE usage ...

Take it or leave it ...


greets,
Bernhard




More information about the TYPO3-dev mailing list