grantus
Active member
I have an input field called 'upload':
	
	
	
		
I'm accessing it in my controller like this:
	
	
	
		
In my saveProcess method:
	
	
	
		
I want to be able to move the uploaded file in the _postSave method so I'm trying this:
	
	
	
		
but how can I pass it $upload_file?
				
			
		Code:
	
	<xf:upload name="upload" accept=".mp3" label="Upload" />I'm accessing it in my controller like this:
		Code:
	
	$upload_file = $this->request->getFile('upload', false, false);In my saveProcess method:
		Code:
	
	$form = $this->formAction();
$form->basicEntitySave($store, $input);I want to be able to move the uploaded file in the _postSave method so I'm trying this:
		Code:
	
	protected function _postSave() {
$dataDir = ('data://upload_test/'.$this->store_id.'.mp3');
\XF\Util\File::copyFileToAbstractedPath($upload_file, $dataDir);
    
}but how can I pass it $upload_file?
 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		