[TYPO3-mvc] Images and extbase

mario chiari m at mariochiari.net
Sat Oct 20 10:49:35 CEST 2012


Claus

FED is on my homework list. I'll be back :-)
Thanks
Best wishes
mario


On Fri, 2012-10-19 at 11:38 +0200, Claus Due wrote:
> Hi Henjo, Mario,
> 
> > the annotation is fine.
> > 
> > The whole message you receive is because extbase doesn't handle file
uploads out of the box, you need to write support for that in your
controller.
> 
> You're damn right about that.
> 
> There's another way though, if you use FED.
> 
> Inject Tx_Fed_Service_File and use
http://fedext.net/services/file.html#autoUpload or its brother,
->getUploadedFiles(), which unlike ->autoUpload() will let you manually
move/copy/check files before attaching them to your properties.
> 
> Usage would be something like:
> 
> public function updateAction($object) {
> 	if ($this->fileService->autoUpload($object, 'filePropertyName',
'/site/relative/base/path') === FALSE) {
> 		throw new SuperException('These are not the uploads you are looking
for', 4815162342);
> 	}
> 	… do more stuff to the object that now has files attached at the
right properties.
> }
> 
> Cheers,
> Claus
...




More information about the TYPO3-project-typo3v4mvc mailing list