From 8a3691055ce215da6378c6a6506bec012c27bd1f Mon Sep 17 00:00:00 2001
From: Sergey Lyubka <valenok@gmail.com>
Date: Tue, 9 Sep 2014 23:20:23 +0100
Subject: [PATCH] Moved file upload example to separate dir

---
 examples/file_upload/Makefile                 | 19 +++++++++++++++++++
 .../{upload.c => file_upload/file_upload.c}   |  1 -
 examples/hello_world/hello_world.c            |  2 +-
 3 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 examples/file_upload/Makefile
 rename examples/{upload.c => file_upload/file_upload.c} (95%)

diff --git a/examples/file_upload/Makefile b/examples/file_upload/Makefile
new file mode 100644
index 000000000..d4a074fbe
--- /dev/null
+++ b/examples/file_upload/Makefile
@@ -0,0 +1,19 @@
+# Copyright (c) 2014 Cesanta Software
+# All rights reserved
+
+PROG = file_upload
+CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA)
+SOURCES = $(PROG).c ../../mongoose.c
+
+all: $(PROG)
+	./$(PROG)
+
+$(PROG): $(SOURCES) Makefile
+	$(CC) -o $(PROG) $(SOURCES) $(CFLAGS)
+
+win:
+	wine cl $(SOURCES) /MD /nologo /DNDEBUG /O1 /I../.. /Fe$(PROG).exe
+	wine $(PROG).exe
+
+clean:
+	rm -rf $(PROG) *.exe *.dSYM *.obj *.exp .*o *.lib *.gc*
diff --git a/examples/upload.c b/examples/file_upload/file_upload.c
similarity index 95%
rename from examples/upload.c
rename to examples/file_upload/file_upload.c
index 2737ba983..f0c6a1a42 100644
--- a/examples/upload.c
+++ b/examples/file_upload/file_upload.c
@@ -15,7 +15,6 @@ static int send_index_page(struct mg_connection *conn) {
                  "<form method=\"POST\" action=\"/handle_post_request\" "
                  "  enctype=\"multipart/form-data\">"
                  "<input type=\"file\" name=\"file\" /> <br/>"
-                 "<input type=\"text\" name=\"input1\" value=hello! /> <br/>"
                  "<input type=\"submit\" value=\"Upload\" />"
                  "</form>");
 
diff --git a/examples/hello_world/hello_world.c b/examples/hello_world/hello_world.c
index 5fae28c5e..95056895d 100644
--- a/examples/hello_world/hello_world.c
+++ b/examples/hello_world/hello_world.c
@@ -2,7 +2,7 @@
 // All rights reserved
 //
 // This example demostrates basic use of Mongoose embedded web server.
-// $Date: 2014-09-09 21:47:07 UTC $
+// $Date: 2014-09-09 22:20:23 UTC $
 
 #include <stdio.h>
 #include <string.h>
-- 
GitLab