diff --git a/http/index.cgi b/http/index.cgi index e6a04f7..28052b2 100755 --- a/http/index.cgi +++ b/http/index.cgi @@ -19,8 +19,12 @@ my $disk_usage = `df -h | awk 'NR==2 {print \$3; exit}'`; my $disk_free = `df -h | awk 'NR==2 {print \$4; exit}'`; my $disk_percentage = `df -h | awk 'NR==2 {print \$5; exit}'`; -print "Content-type: text/html\n\n"; +if ($ENV{REQUEST_METHOD} eq "POST") { + do "./upload.cgi"; + exit; +} +print "Content-type: text/html\n\n"; print "
@@ -37,9 +41,9 @@ print " star me - - +I recommend using lainsafecli to upload files to lainsafe, however, there is more than one way to do it.
+curl -F 'file=@1605388889.png' $ENV{HTTP_HOST}$ENV{REQUEST_URI}