--- upload_image.module	Fri Feb 10 22:53:09 2006
+++ upload_image.option	Fri Feb 10 22:57:32 2006
@@ -39,6 +39,8 @@ function upload_image_nodeapi(&$node, $o
       $output = '';
       $output .= form_radios(t('Create attached images'), 'upload_image_create_'. $node->type, variable_get('upload_image_create_'. $node->type, 1), array(t('Disabled'), t('Enabled')), t('If you upload an image to nodes of this type, do you want to create image nodes form them?'));
       $output .= form_radios(t('Delete attached images'), 'upload_image_delete_'. $node->type, variable_get('upload_image_delete_'. $node->type, 1), array(t('Disabled'), t('Enabled')), t('Attached images are nodes in their own right connected to the nodes they have been uploaded with. If you enable this they will be deleted with their parent node.'));
+      $image->taxonomy = variable_get('upload_image_galery_'. $node->type, array());
+      $output .= implode('', taxonomy_node_form('image', $image, t('If you upload an image to nodes of this type, and you create image nodes form them, which image gallery should it be saved to?'), 'upload_image_galery_'. $node->type));
       break;
     case 'load':
       break;
@@ -124,6 +126,7 @@ function upload_image_save($node) {
         $image->body = t('This image was uploaded with the post %title.', array('%title' => l(theme('placeholder', $node->title), "node/$node->nid", array(), NULL, NULL, FALSE, TRUE)));
         $image->image = $file;
         $image->file = $image->images['_original'] = $file->filepath;
+        $image->taxonomy = variable_get('upload_image_galery_'. $node->type, array());
         _image_build_derivatives($image, true);
         // $image = node_validate($image);
         $image->nid = node_save($image);
