how to upload image throu lightweight module plugin ?

Hello sir !I have made a image upload plugin and it has made thro shopware lightweight module but i have in trouble when i upload image 

1)how to define a path where my image has to be physically save 

2)how to save this this image name into database and then how to retrive it as well in any page 

i have installed lightweight plugin and used as well but their is no option such like that so kindly help me sir my action is : 

**public function** setAction() { //$basePath = $this-\>request-\>getBasePath().'/media/upload/'; $uploadedFile = ''; /\*if(!empty($\_FILES["file"]["type"])){ $fileName = time().'\_'.$\_FILES['file']['name']; echo $fileName;die(); $temporary = explode(".", $\_FILES["file"]["name"]); $sourcePath = $\_FILES['file']['tmp\_name']; $targetPath = $this-\>request-\>getBasePath().'/media/upload/'. $fileName; if(move\_uploaded\_file($sourcePath,$targetPath)){ $uploadedFile = $fileName; } }\*/ $name = $this-\>Request()-\>getParam('name'); //$image = $this-\>Request()-\>$fileName; $articleid = $this-\>Request()-\>getParam('articleid'); $image = $this-\>Request()-\>file\_put\_contents('file', 'name'); **echo** $image; **die** (); $desc = $this-\>Request()-\>getParam('desc'); $desclong = $this-\>Request()-\>getParam('desclong'); $sts = $this-\>Request()-\>getParam('sts',0); $sql = "insert into bcgh\_custom\_data (name,article\_id, description, descriptionLong,active,image) values ('{$name}', {$articleid}, '{$desc}', '{$desclong}',{$sts},'{$image}')"; var\_dump($sql); **die** (); $data = Shopware()-\>Db()-\>exec($sql); /\*return $this-\>redirect( array( 'controller'=\> 'ExampleModulePlainHtml', 'action' =\> 'index')

);

}

what would i used here properly 

my input field name is „image“ my target action is setAction

Thanks