Index: upload.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/upload.js,v
retrieving revision 1.11
diff -u -p -r1.11 upload.js
--- upload.js	31 Aug 2006 23:31:25 -0000	1.11
+++ upload.js	31 Jul 2007 17:32:20 -0000
@@ -6,8 +6,7 @@
 Drupal.uploadAutoAttach = function() {
   $('input.upload').each(function () {
     var uri = this.value;
-    // Extract the base name from the id (edit-attach-url -> attach).
-    var base = this.id.substring(5, this.id.length - 4);
+    var base = 'attach';
     var button = base + '-button';
     var wrapper = base + '-wrapper';
     var hide = base + '-hide';
