[Flow] Image upload and displaying the uploaded image

Steffen Wickham steffen at gaming-inc.de
Mon Jan 13 14:36:30 CET 2014


Hello Cornel,

what kind of error do you get?



Am 13.01.14 14:34, schrieb Cornel Widmer:
> Hi! I'm back with a related problem, and I believe its nice to have 
> the answer in this topic.
>
> I want to remove the image in my model and its some kind of difficult 
> for me. I configured the Resource in my model and wrote a own function 
> to reset the property. As I've seen in the database the field is of 
> type "varchar" - so I mentioned that it is enough to set to an empty 
> string.
>
> Of Course - in the Controller - I've removed the file on the 
> filesystem with: $this->resourceManager->deleteResource( resource );
>
> The delete function of the resource manager works like a charm but my 
> own code gives back an error. Is there any tutorial how file removing 
> has to be done?
>
> MODEL:
> /**
> * @var \TYPO3\Flow\Resource\Resource
> * @ORM\OneToOne
> */
> protected $image;
>
> /**
> * remover for image
> *
> * @return void
> */
> public function removeImage() {
>     $this->image = '';
> }
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list