diff --git a/Cmd b/Cmd index 53089b8..90c2e2d 100755 Binary files a/Cmd and b/Cmd differ diff --git a/Gateway.go b/Gateway.go index f4cadd2..1ab568c 100644 --- a/Gateway.go +++ b/Gateway.go @@ -220,6 +220,7 @@ func webGatewayShowFile(backend *core.Backend, w http.ResponseWriter, r *http.Re download := r.URL.Query().Get("download") metadata := r.URL.Query().Get("metadata") filename := r.URL.Query().Get("filename") + play := r.URL.Query().Get("play") //// look up file based on NodeID //var resultMap map[uuid.UUID]*search.SearchIndexRecord @@ -272,6 +273,9 @@ func webGatewayShowFile(backend *core.Backend, w http.ResponseWriter, r *http.Re webapi.EncodeJSON(backend, w, r, responseMetadata) return + } else if play == "true" { + // Plays / previews the video + io.Copy(w, io.LimitReader(reader, int64(transferSize))) } // set the right headers diff --git a/html/download.html b/html/download.html index f9b203c..86fb918 100644 --- a/html/download.html +++ b/html/download.html @@ -22,12 +22,24 @@
+ + +
+ + +
+

Download this file from Peernet

Download from the browser

Instantly stream it with the Peernet Browser
+
@@ -41,15 +53,15 @@