[TYPO3] preventing extension from renaming a file upload

Peter Klein peter at umloud.dk
Sat Mar 18 00:38:50 CET 2006


Hi John. If the user is only allowed to select ONE file, then you could do 
it by changing the TCA "type" from a "group" to a "input", and then add 
linkwizard to that field.. Using this method, it refers directly to the file 
selected.

-- cut --
  "myfield" => Array (
   "exclude" => 1,
   "label" => "blabla",
   "config" => Array (
    "type" => "input",
    "size" => "30",
    "wizards" => Array(
     "_PADDING" => 2,
     "link" => Array(
      "type" => "popup",
      "title" => "Link",
      "icon" => "link_popup.gif",
      "script" => "browse_links.php?act=file&mode=wizard",
      "JSopenParams" => 
"height=300,width=500,status=0,menubar=0,scrollbars=1"
     ),
    ),
   )
  ),
-- cut --

--
Peter Klein / Umloud Untd.

"John Nicholas" <typo3user at mobosplash.com> wrote in message 
news:mailman.1.1142634295.11909.typo3-english at lists.netfielders.de...
>I have a fairly simple extension that allows a user to select a file from 
>within the fileadmin folder. It then automatically copies to the 
>uploads/extension_name folder and if there is another image there with the 
>same name it renames it with a _0x.
>
> The way this extension works, I want to keep whatever name is selected. 
> How do I make it either overwrite the image in uploads or even better, not 
> bother to copy it at all? 





More information about the TYPO3-english mailing list