In system.xml file you can upload images to /media/… by using:
<upload_dir config="system/filesystem/media" scope_info="1">modulename/folder</upload_dir>
<base_url type="media" scope_info="1">modulename/folder</base_url>
However i need to upload the image in skin/frontend/modulename/themename/css/images directory. I've tried with config="system/filesystem/skin" and type="skin" but it doesn't work.
Best Answer
Before I explain how you can achieve this I want to say that I don't approve of the upload of resources in folders other than
media
. Your Magento instance should only write files tomedia
andvar
.But if you insist.....
You can't do much only my changing the
upload_dir
andbase_url
tags.The config input has the
<backend_model>
a class that extendsMage_Adminhtml_Model_System_Config_Backend_File
.And in that class there is this method that determines the base folder where the file will be uploaded.
This means that everything is uploaded somewhere inside the
media
folder.So you need to create a backend model that extends the original one and change the method I mentioned above