aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-07 08:57:23 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-07 08:57:23 -0600
commit97f6cc0097345caecf952e4b689c733c43f134fc (patch)
treed5cd9265559757e73ee714067ab9f11bcb016d62
parentd2fab210ca437643e420b9924650f1551e497f8b (diff)
remove UI for submitting imagesillustrations
fcgiwrap is broken and will not support file uploads as big as an image. so, I plan to just manually add images for now. images can be displayed, but the administrator has to add them.
-rw-r--r--debug/nginx.conf2
-rwxr-xr-xzzcxz.cgi45
2 files changed, 25 insertions, 22 deletions
diff --git a/debug/nginx.conf b/debug/nginx.conf
index 1ff0baf..dd560b1 100644
--- a/debug/nginx.conf
+++ b/debug/nginx.conf
@@ -19,6 +19,8 @@ http {
gzip off;
+ proxy_temp_path /tmp;
+
server {
listen 8080;
diff --git a/zzcxz.cgi b/zzcxz.cgi
index 606a76c..21fffa9 100755
--- a/zzcxz.cgi
+++ b/zzcxz.cgi
@@ -331,11 +331,11 @@ map["^/g/(%w%w%w%w%w)$"] = function(p)
<img class="illustration" src="/i/%s.%s" />
]]):format(p, page.illustration)
else
- draw_this = ([[
- <p id="draw-this"><a href="%s/illustrate">
- illustrate this
- </a></p>
- ]]):format(p)
+-- draw_this = ([[
+-- <p id="draw-this"><a href="%s/illustrate">
+-- illustrate this
+-- </a></p>
+-- ]]):format(p)
end
return base {
@@ -454,7 +454,8 @@ local illustrate_template = template [[
$content
<hr/>
<h2 id="what">what does this look like?</h2>
- <form action="/g/$page" enctype="multipart/form-data" id="img-form">
+ <form method="POST" action="/g/$page/illustrate"
+ enctype="multipart/form-data" id="img-form">
<input
type="file"
name="file"
@@ -463,22 +464,22 @@ local illustrate_template = template [[
<input type="submit" value="submit image" />
</form>
]]
-map["^/g/(%w%w%w%w%w)/illustrate"] = function(p)
- local page = load_page(p)
- if not page then return not_found() end
-
- if env "REQUEST_METHOD" ~= "POST" then
- return base {
- title = "illustration: " .. html_encode(page.title),
- content = illustrate_template {
- title = html_encode(page.title),
- content = convert_markup(page.content),
- page = p,
- },
- }
- else
- end
-end
+-- map["^/g/(%w%w%w%w%w)/illustrate"] = function(p)
+-- local page = load_page(p)
+-- if not page then return not_found() end
+--
+-- if env "REQUEST_METHOD" ~= "POST" then
+-- return base {
+-- title = "illustration: " .. html_encode(page.title),
+-- content = illustrate_template {
+-- title = html_encode(page.title),
+-- content = convert_markup(page.content),
+-- page = p,
+-- },
+-- }
+-- else
+-- end
+-- end
map["^/i/(%w%w%w%w%w).(%w+)$"] = function(p, format)
local page = load_page(p)