[TYPO3] Extension TCA fields... uploading images and resizing them?

bernd wilke xoonsji02 at sneakemail.com
Mon May 19 17:38:40 CEST 2008


on Mon, 19 May 2008 11:31:40 +0200, Andrew Plank wrote:

> Hi,
> 
> I've written an extension that allows users to upload images. I would
> like to be able to resize these images - as they are uploaded - to a
> pre-determined size.
> 
> I've read in the docs that once a file exists in the uploads folder, it
> shouldn't be touched in any way, except by Typo3's own internal
> processing. Therefore - I thought - the image needs to be processed
> somewhere between the file beginning its upload, and being finally saved
> into the uploads folder.
> 
> Reading further into the docs, I found the "user" type, where the form
> field can be a custom field. However, after a little while tinkering
> with this, I realised that this is only the method to display a custom
> field on the page... It's not how to grab the file as it is uploaded.
> 
> Is there some sort of hook into the system one can make that allows one
> to process uploaded images before they are saved?
> 
> I find it quite simply boggling that the resizing of uploaded images
> isn't a default feature within the "files" field type when "images" is
> chosen as the allowed file types.
> 
> Any help or pointers on this subject would be most greatly appreciated.

as this question raised a few times the last year and a customer 
requested this for his website I did a modification to the extension 
cwt_community (diff send to ext-developer). The central part of this 
change you can find at http://www.pi-phi.de/t3v4/177.html.

feel free to use it at your own needs.

bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list