6627b1c33bdef1886f84fce4df14d0dd5c786657
chmalee
  Fri Mar 8 17:10:21 2024 -0800
Make the DataTable update dynamically. Correctly use a hidden file input to keep track of submitted and unsubmitted files

diff --git src/hg/hgHubConnect/hooks/hooklib.h src/hg/hgHubConnect/hooks/hooklib.h
index db5f699..0c1e5bc 100644
--- src/hg/hgHubConnect/hooks/hooklib.h
+++ src/hg/hgHubConnect/hooks/hooklib.h
@@ -1,22 +1,33 @@
 /* hooklib - Common routines for all the tusd hooks */
 
 /* Copyright (C) 2008 The Regents of the University of California 
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 
 #ifndef HOOKLIB_H
 #define HOOKLIB_H
 #define ERR_MSG "errorMessage"
 #define REJECT_SETTING "RejectUpload"
 #define STOP_SETTING "StopUpload"
 #define HTTP_NAME "HTTPResponse"
+#define HTTP_STATUS "StatusCode"
+#define HTTP_BODY "Body"
+#define HTTP_HEADER "Header"
+#define HTTP_CONTENT_TYPE "Content-Type"
+#define HTTP_CONTENT_TYPE_STR "application/json"
 #define MAX_QUOTA_BYTES 1000000000
 #define MAX_QUOTA MAX_QUOTA_BYTES
 
+char *prettyFileSize(long size);
+/* Return a string representing the size of a file */
+
 void fillOutHttpResponseError();
 
 void fillOutHttpResponseSuccess();
 
+struct jsonElement *makeDefaultResponse();
+/* Create the default response json with some fields pre-filled */
+
 void rejectUpload(struct jsonElement *response, char *msg, ...);
 /* Set the keys for stopping an upload */
 
 #endif /* HOOKLIB_H */