Question: currently i am doing environment setup for react.js with npm (babel, webpack and etc.) and i now i am filling webpack.config.js file and tutorial that i am following has next code : 

```
 module: {
  rules: [
     {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        query: {
           presets: ['es2015', 'react']
        }
     }
  ]
},

```

and as i see in presents property there are written es2015 (ECMAScript 5) and i want to know it is better be like that or i should switch it to ES6 or ES7 because it is 2019 and even ES6 has way too more features. i just started react and if i asked something stupid, correct me. thanks

Answer: 
Here is your project directory tree

```
/erp-system
  /application
   -/config
   -/controllers
   -/cache
   -/core
  /system
  index.php

```

Just update the `$config['upload_path']` like this

If uploads folder inside the `application` folder

```
$config['upload_path'] = APPPATH.'uploads';

```

If outside the application folder

```
$config['upload_path'] = FCPATH.'uploads';

```

`APPPATH` is the `application` folder of your project.

`FCPATH` is the project folder `erp-system`
Autoload upload library in config/autoload file `$autoload['libraries'] = array("upload");`

```
   $config['upload_path']          = 'uploads/';
   $config['allowed_types']        = 'gif|jpg|png|pdf';
   $config['max_size']             = 100;
   $config['max_width']            = 1024;
   $config['max_height']           = 768;

        $this->upload->initialize($config);
        if(!$this->upload->do_upload('userfile'))
        {
                $error = array('error' => $this->upload->display_errors());

                $this->load->view('upload_form', $error);
        }

```