Is there a way to upload files to the theme directory
It doesn't look like the file module places any restriction on the upload path, so in theory it should be as simple as:

'#upload_location' =&gt; DRUPAL_ROOT . '/' . drupal_get_path('theme', 'MYTHEME') . '/images/backgrounds';


However, having your theme folder writable by the web server would usually indicate that permissions are not set correctly. It would be a better idea to fix those, and save your images in the proper location (i.e. sites/default/files); see Securing file permissions and ownership for full details.