[TYPO3-dev] Disable Image upload field in be for file group in extension tca

Andrew Davis andrew at theandrewunderground.com
Sat Feb 17 16:06:18 CET 2007


i am making a simple extension. in the be there is a file field (image) 
and by default it has a field to upload a file. When user does this it 
uploads the file into the specified upload folder. But if the user 
changes the image, the image file is deleted from this uploads folder.

i want to disable this upload field, so that the user must upload files 
thru filelist module and choose them. in the choosing, the file gets 
copied into the extensions upload folder, which is fine, and if ever 
deleted from the record, the original remains.

I have looked thru the core api and in the section on
$TCA array reference  > Example - Attaching images
(about page 107) it shows possible entries and description, but doesnt 
mention the possiblility of leaving part out.



here is the tca part for the field

[...]

	"fc_main_image" => Array (		
			"exclude" => 0,		
			"label" => 
"LLL:EXT:avgf_feat_content/locallang_db.xml:tx_avgffeatcontent_items.fc_main_image", 
	
			"config" => Array (
				"type" => "group",
				"internal_type" => "file",
				"allowed" => "gif,png,jpeg,jpg",	
				"max_size" => 500,	
				"uploadfolder" => "uploads/tx_avgffeatcontent",
				"show_thumbs" => 1,	
				"size" => 4,	
				"minitems" => 0,
				"maxitems" => 1,
			)
		),

[...]


is there any way to disable the upload field from displaying? I wonder 
if leaving maxsize or another item empty will disable that ?


Thanks for any assistance,

Andrew Davis




More information about the TYPO3-dev mailing list