initial tests for image uploads
authorArt Cancro <ajc@citadel.org>
Thu, 10 Dec 1998 16:38:27 +0000 (16:38 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 10 Dec 1998 16:38:27 +0000 (16:38 +0000)
webcit/static/menubar.html
webcit/static/upload.html [new file with mode: 0644]
webcit/webcit.c

index 9fb61388039f27389920135a5f7636f413b1d598..ce0b9332ee97737bddc28e0c9a299fd0434bdd51 100644 (file)
@@ -4,21 +4,22 @@
 </HEAD>
 <BODY BACKGROUND="/image&name=background" TEXT="#000000" LINK="#004400">
        <H2>Citadel/UX</H2>
-       <UL>
-               <LI><A HREF="/knrooms" TARGET="bottom">List known rooms
-               <LI><A HREF="/gotonext" TARGET="top">Goto next room
-               <LI><A HREF="/skip" TARGET="top">Skip this room
-               <LI><A HREF="/ungoto" TARGET="top">Ungoto
-               <HR>
-               <LI><A HREF="/readnew" TARGET="bottom">Read new messages
-               <LI><A HREF="/readfwd" TARGET="bottom">Read all messages
-               <LI><A HREF="/display_enter" TARGET="bottom">Enter a message
-               <HR>
-               <LI><A HREF="/whobbs" TARGET="bottom">Who is online?
-               <LI><A HREF="/userlist" TARGET="bottom">User list
-               <LI><A HREF="/advanced" TARGET="bottom">Advanced options
-               <HR>
-               <LI><A HREF="/termquit" TARGET="_top">Log off
-       </UL>
+       <FONT SIZE=-1>
+       <A HREF="/knrooms" TARGET="bottom">List known rooms<BR>
+       <A HREF="/gotonext" TARGET="top">Goto next room<BR>
+       <A HREF="/skip" TARGET="top">Skip this room<BR>
+       <A HREF="/ungoto" TARGET="top">Ungoto<BR>
+       <HR>
+       <A HREF="/readnew" TARGET="bottom">Read new messages<BR>
+       <A HREF="/readfwd" TARGET="bottom">Read all messages<BR>
+       <A HREF="/display_enter" TARGET="bottom">Enter a message<BR>
+       <HR>
+       <A HREF="/whobbs" TARGET="bottom">Who is online?<BR>
+       <A HREF="/userlist" TARGET="bottom">User list<BR>
+       <A HREF="/advanced" TARGET="bottom">Advanced options<BR>
+       <HR>
+       <A HREF="/static/upload.html" TARGET="bottom">upload test<BR>
+       <A HREF="/termquit" TARGET="_top">Log off<BR>
+       </FONT>
 </BODY>
 </HTML>
diff --git a/webcit/static/upload.html b/webcit/static/upload.html
new file mode 100644 (file)
index 0000000..9cb169a
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+<head><title>Uploading test</title></head>
+
+   <FORM ENCTYPE="multipart/form-data" ACTION="/the-url" METHOD="POST">
+        <TABLE BORDER=0 WIDTH="460">
+        <TR>
+            <TD ALIGN=RIGHT>
+                File 1:
+            </TD>
+            <TD>
+                <INPUT TYPE="FILE" NAME="file-to-upload-01" SIZE="35">
+            </TD>
+        </TR>
+        <TR>
+            <TD COLSPAN=2>&nbsp;<BR></TD>
+        </TR>
+        <TR>
+            <TD>
+                <INPUT TYPE="SUBMIT" VALUE="Upload File(s)!">
+            </TD>
+            <TD ALIGN=RIGHT>
+                <INPUT TYPE="RESET" VALUE="Reset Form">
+            </TD>
+        </TR>
+        </TABLE>
+        </FORM>
+
+</body></html>
+
+
index 273fb2a1e60a2d6df380a209e2aa496f654020f1..1cc25206fded038f154575382ee7ae7b0dbe8ffc 100644 (file)
@@ -439,6 +439,7 @@ void session_loop(void) {
        int a, b;
        int ContentLength = 0;
        char *content;
+FILE *fp;
 
        /* We stuff these with the values coming from the client cookies,
         * so we can use them to reconnect a timed out session if we have to.
@@ -483,6 +484,9 @@ void session_loop(void) {
        if (ContentLength > 0) {
                content = malloc(ContentLength+1);
                fread(content, ContentLength, 1, stdin);
+fp = fopen("content", "wb");
+fwrite(content, ContentLength, 1, fp);
+fclose(fp);
                content[ContentLength] = 0;
                addurls(content);
                }