rem:  var button = input.name.substr(5, input.name.length - 6).replace('][', '-'); var wrapper = button + '-wrapper'; var hide = button + '-hide'; 
add:  var base = input.id.substring(5, input.id.length - 4); var button = base + '-button'; var wrapper = base + '-wrapper'; var hide = base + '-hide'; 
context: function uploadAutoAttach() {  var inputs = document.getElementsByTagName('input');  for (i = 0; input = inputs[i]; i++) {    if (input && hasClass(input, 'upload')) {      var uri = input.value;      // Extract the button ID based on a substring of the input name: edit[foo][bar] -> foo-bar      var button = input.name.substr(5, input.name.length - 6).replace('][', '-');      var wrapper = button + '-wrapper';      var hide = button + '-hide';      var upload = new jsUpload(uri, button, wrapper, hide);    }  }}
meta: 3097	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3097/6bbc4d7bf16864eec4b26be731c0026d9d893a13/upload.js/clean/misc/upload.js