X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=src%2Fuploader%2Fmain.go;h=788c2cafc7a43df9a907266ab2499fb36a951863;hb=4cf829bd25c3f01a45e1823bb8d07d0fb660d98a;hp=a1465cd663bfbe5b75807e2d06c1e697d5cdce48;hpb=fdb331e661f83fc72440573c4d48cbfc28dbace3;p=uploader.git
diff --git a/src/uploader/main.go b/src/uploader/main.go
index a1465cd..788c2ca 100644
--- a/src/uploader/main.go
+++ b/src/uploader/main.go
@@ -7,15 +7,20 @@ package main
import (
"bufio"
+ "encoding/base64"
"encoding/hex"
"flag"
"fmt"
"html/template"
"io"
+ "io/ioutil"
"log"
+ "mime"
"net"
"net/http"
"os"
+ "os/exec"
+ "strings"
"time"
"golang.org/x/crypto/blake2b"
@@ -26,6 +31,8 @@ const (
WriteBufSize = 1 << 20
FileFieldName = "fileupload"
CommentFieldName = "comment"
+
+ SendmailCmd = "/usr/sbin/sendmail"
)
var (
@@ -37,8 +44,41 @@ var (