[Typo3-UG Oesterreich] Unique Filenames - Help from Typo3-EN

Bernhard Kraft kraftb at mokka.at
Thu Mar 18 10:39:14 CET 2004


Hab mit Hilfe der englisch-sprachigen Mailingliste eine
Lösung gefunden

-------- Original Message --------
Subject: Re: [Typo3] Unique Filenames
Date: Wed, 17 Mar 2004 19:02:32 +0100
From: christian reiter <cr at n-o-s-p-a-m-cxd.de>
Reply-To: Typo3 English <typo3-english at lists.netfielders.de>
To: typo3-english at lists.netfielders.de
Newsgroups: typo3.english
References: 
<mailman.1503.1079543219.32178.typo3-english at lists.netfielders.de>

Hello,

This might help you:

function getUniqueName($theFile, $theDest, $dontCheckForUnique=1)

This is in class.t3lib_basicfilefunc.php somewhere around line 180+ in Typo3
3.5.0

Comments like
// Well the filename in it's pure form existed. Now we try to append numbers
/ unique-strings and see if we can find an available filename...

indicate that this is exactly the place where image_23.jpg etc is made.

Greetings,
Christian Reiter

"Bernhard Kraft" <kraftb at mokka.at> schrieb im Newsbeitrag
news:mailman.1503.1079543219.32178.typo3-english at lists.netfielders.de...
> Hello !
>
> I have a short question about an API call which
> I need for writing an extension.
>
> I need the API call which gets used for getting
> unique filenames.
>
> I have an File Upload Form and want to handle the
> uploaded file. It has to get stored in
> "uploads/tx_extensionkey"
>
> Which function do I have to use to get a filename
> which is unique and has the same syntax as the
> filenames used by typo3 (_2, _3, _4 and so on)
>
>
> greets,
> Bernhard
> -- 
> -----------------------------------------
> Bernhard Kraft
> <kraftb at mokka.at>
>
> MOKKA MEDIENAGENTUR GMBH
> Mariahilferstrasse 170
> 1150 Wien
> T: 01 895 33 33 50
> M: 0676 560 14 14
> F: 01 895 33 33 20
> www.mokka.at
> -----------------------------------------
>


_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




-- 
-----------------------------------------
Bernhard Kraft
<kraftb at mokka.at>

MOKKA MEDIENAGENTUR GMBH
Mariahilferstrasse 170
1150 Wien
T: 01 895 33 33 50
M: 0676 560 14 14
F: 01 895 33 33 20
www.mokka.at
-----------------------------------------




More information about the TYPO3-at mailing list