From 0fd93a8b01c5457f85533e1239707150c8dc2f74 Mon Sep 17 00:00:00 2001 From: Remco Date: Thu, 14 Jan 2016 09:33:02 +0100 Subject: [PATCH] added sandbox --- transfersh-server/handlers.go | 12 +- transfersh-server/static/download.audio.html | 6 +- transfersh-server/static/download.html | 6 +- transfersh-server/static/download.image.html | 6 +- .../static/download.markdown.html | 6 +- .../static/download.sandbox.html | 120 ++++++++++++++++++ transfersh-server/static/download.video.html | 6 +- transfersh-server/static/includes/footer.html | 6 +- transfersh-server/static/index.html | 80 ++++++++---- transfersh-server/static/styles/main.css | 2 +- transfersh-web/download.sandbox.html | 39 ++++++ 11 files changed, 225 insertions(+), 64 deletions(-) create mode 100644 transfersh-server/static/download.sandbox.html create mode 100644 transfersh-web/download.sandbox.html diff --git a/transfersh-server/handlers.go b/transfersh-server/handlers.go index 86825b2..bad84cf 100644 --- a/transfersh-server/handlers.go +++ b/transfersh-server/handlers.go @@ -34,10 +34,6 @@ import ( "compress/gzip" "errors" "fmt" - "github.com/dutchcoders/go-clamd" - "github.com/gorilla/mux" - "github.com/kennygrant/sanitize" - "github.com/russross/blackfriday" html_template "html/template" "io" "io/ioutil" @@ -51,6 +47,12 @@ import ( "strings" text_template "text/template" "time" + + clamd "github.com/dutchcoders/go-clamd" + + "github.com/gorilla/mux" + "github.com/kennygrant/sanitize" + "github.com/russross/blackfriday" ) func healthHandler(w http.ResponseWriter, r *http.Request) { @@ -102,7 +104,7 @@ func previewHandler(w http.ResponseWriter, r *http.Request) { } else if strings.HasPrefix(contentType, "text/plain") { content = html_template.HTML(fmt.Sprintf("
%s
", data)) } else { - content = html_template.HTML(data) + templatePath = "download.sandbox.html" } default: diff --git a/transfersh-server/static/download.audio.html b/transfersh-server/static/download.audio.html index 1920184..81cb77d 100644 --- a/transfersh-server/static/download.audio.html +++ b/transfersh-server/static/download.audio.html @@ -85,11 +85,7 @@