I would like to get a value of URL media files and media my directory. Currently I have putting this settings in app/config/config.php. However, I intend to define constants (MEDIA_URL, MEDIA_ROOT) on index.php, such as APPROOT, COREPATH...
So here is go my question: Is it safe to do it? Is there some downside for future upgrades/updates?
Out of these two options, you should define them in the file APPPATH/bootstrap.php. They shouldn't go into the DOCROOT/index.php because that is a place to only get your app going and should be kept easily upgradable which can only be obtained by not really touching the file.
However, the best is probably to define an app-sepcific file at config/app.php which does not keep these constants but keeps them in the array e.g.
This config file should then be auto-loaded in the app/config.php:always_load.config
Using this approach you can update fuel without problems and all your app-specific data is defined in the app's config files (from my point of view those constants you want to define shouldn't be DEFINE'd constants but rather static config variables.)