Jump to content


Upload in a specific directory


  • Please log in to reply
1 reply to this topic

#1 drjonesx

drjonesx

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 November 2014 - 12:20 PM

Hi

Is there some one that can help me to do that?

 

I need to have an upload that is made in fonction of the product and categorie selected

Example

Category : car
Product : v1.1
files: xxx.exe

the needed upload result is 

../upload/car/v1.1/xxx.exe

 

In advance, thanks for your help

 

PS: i have also Teamviewer if it easyer :-)

 

 

 



#2 Mike

Mike

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationValencia (Spain)

Posted 28 June 2015 - 10:21 AM

Hello, i'm a newbie within this library, but i think you can do it by passing a variable to the set_field_upload method, something like this:

public function employees_management($myvar)
{
		$crud = new grocery_CRUD();

		$crud->set_theme('datatables');
		$crud->set_table('employees');
		$crud->set_relation('officeCode','offices','city');
		$crud->display_as('officeCode','Office City');
		$crud->set_subject('Employee');

		$crud->required_fields('lastName');

		$crud->set_field_upload('file_url','assets/uploads/'. $myvar .'files');

		$output = $crud->render();

		$this->_example_output($output);
}

Greetings!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users