forked from electricdusk/rushlink
web: Implement drag-and-drop upload
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{block "title" .}}rushlink{{end}}</title>{{block "head-append" .}}{{end}}
|
||||
<title>{{block "title" .}}rushlink{{end}}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/main.css" />
|
||||
{{block "head-append" .}}{{end -}}
|
||||
</head>
|
||||
<body>
|
||||
{{block "body" .}}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{{define "head-append"}}
|
||||
<script type="text/javascript" src="/js/dragdrop.js" defer></script>
|
||||
{{end}}
|
||||
|
||||
{{define "body"}}
|
||||
<div style="visibility:hidden; opacity:0" id="dropZone">File incoming! :D</div>
|
||||
<h1>#RU paste-dump</h1>
|
||||
|
||||
Based on https://0x0.st/, this site allows you to easily upload files and shorten URLs using
|
||||
@@ -6,17 +11,17 @@ the command line.
|
||||
|
||||
<h2>Web-API</h2>
|
||||
<section>
|
||||
<form action="/" method="post" enctype="multipart/form-data">
|
||||
<form id="fileUploadForm" action="/" method="post" enctype="multipart/form-data">
|
||||
<label class="formLabel" for="fileUploadField">Upload a file:</label>
|
||||
<input class="formMain" id="fileUploadField" name="file" type="file" />
|
||||
<input class="formSubmit" id="fileUploadSubmit" type="submit" value="upload!" />
|
||||
<input id="fileUploadField" class="formMain" name="file" type="file" />
|
||||
<input id="fileUploadField" class="formSubmit" type="submit" value="upload!" />
|
||||
</form>
|
||||
</section>
|
||||
<section>
|
||||
<form action="/" method="post" enctype="multipart/form-data">
|
||||
<form id="shortenURLForm" action="/" method="post" enctype="multipart/form-data">
|
||||
<label class="formLabel" for="shortenURLField">Upload a URL:</label>
|
||||
<input class="formMain" id="shortenURLField" name="shorten" type="url" />
|
||||
<input class="formSubmit" id="shortenURLSubmit" type="submit" value="shorten!" />
|
||||
<input id="shortenURLField" class="formMain" name="shorten" type="url" />
|
||||
<input id="shortenURLSubmit" class="formSubmit" type="submit" value="shorten!" />
|
||||
</form>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user