#include "webcit.h"
-struct uploaded_file {
- char id[64];
- char filename[256];
- char content_type[256];
- long length;
- FILE *fp;
-};
-
Array *upload_list = NULL; // all files uploaded to this webcit instance
pthread_mutex_t upload_list_mutex = PTHREAD_MUTEX_INITIALIZER; // Lock it before modifying
}
-// DAV delete an uploaded item
-void dav_delete_upload(struct http_transaction *h, struct ctdlsession *c, struct uploaded_file this_one) {
+// delete an uploaded item
+void delete_upload(struct uploaded_file this_one) {
int i;
struct uploaded_file *u;
}
}
pthread_mutex_unlock(&upload_list_mutex);
+}
+
+// DAV delete an uploaded item
+void dav_delete_upload(struct http_transaction *h, struct ctdlsession *c, struct uploaded_file this_one) {
+ delete_upload(this_one);
do_204(h);
}
// If we get to this point, the client requested an action we don't know how to perform.
do_404(h);
-}
\ No newline at end of file
+}
time_t room_mtime; // Timestampt of the most recent write activity in this room
};
+struct uploaded_file { // things that have been uploaded to the server (such as email attachments)
+ char id[64];
+ char filename[256];
+ char content_type[256];
+ long length;
+ FILE *fp;
+};
+
extern char *ssl_cipher_list;
extern int is_https; // nonzero if we are an HTTPS server today
extern char *ctdl_dir; // directory where Citadel Server is running
// Flush all uploaded files and close the window
function flush_uploads() {
document.getElementById('ctdl-upload').style.display='none';
+
// FIXME tell the server to delete the files
+ uploads.forEach(u => {
+ console.log(u.ref);
+ });
uploads=[];
}