broken: attachments window cannot be a child of the editor body
[citadel.git] / webcit-ng / static / js / upload.js
index 96e02b972e7a53b90b556155c293723140ac91cf..228e97aceb5f2e0b57f07f68049cfb852cc6f6a0 100644 (file)
@@ -89,10 +89,10 @@ function upload_file(file) {
                                + ` `
                                + item["uploadfilename"] + " (" + item["contenttype"] + ", " + item["contentlength"] + " " + _("bytes") + ")";
                                document.getElementById("ctdl-upload_list").appendChild(new_upl);
-                       });
 
-                       // append it to the global list of uploads
-                       uploads.push(j_response);
+                               // append it to the global list of uploads
+                               uploads.push(item);
+                       });
                        document.getElementById("num_attachments").innerHTML = uploads.length;
                }
                else if (xhr.readyState == 4 && xhr.status != 200) {