[Flow] Image upload and displaying the uploaded image

Cornel Widmer cornel at kollerinternet.ch
Mon Jan 13 14:34:49 CET 2014


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 = '';
}


More information about the Flow mailing list