mirror of
https://github.com/PeernetOfficial/WebGatewayUpload.git
synced 2026-07-19 04:37:50 +01:00
added README and removed unwanted files
This commit is contained in:
45
README.md
45
README.md
@@ -1,2 +1,45 @@
|
||||
# Web Gateway upload
|
||||
The following repository consists of the Peernet Web gateway upload implementation.
|
||||
The following repository consists of the Peernet Web gateway upload implementation.
|
||||
|
||||
## Features:
|
||||
- Upload file from Webpage
|
||||
- Upload file to Peernet from a single Curl request
|
||||
|
||||
## Build
|
||||
```go
|
||||
go build .
|
||||
```
|
||||
|
||||
## Run
|
||||
Run on default parameters
|
||||
```
|
||||
./WebGatewayUpload
|
||||
```
|
||||
Custom Flags
|
||||
```
|
||||
./WebGatewayUpload -h
|
||||
|
||||
Usage of ./WebGatewayUpload:
|
||||
-BackEndApiAddress string
|
||||
current environment (default "localhost:8088")
|
||||
-Certificate string
|
||||
SSL Certificate file (default "server.crt")
|
||||
-Key string
|
||||
SSL Key file (default "server.key")
|
||||
-SSL
|
||||
Flag to check if the SSL certificate is enabled or not
|
||||
-WebpageAddress string
|
||||
current environment (default "localhost:8098")
|
||||
```
|
||||
|
||||
## Routes
|
||||
- (GET) `/upload` (Opens upload page in the webgateway)
|
||||
- (POST) `/upload` (Uploads file to peernet from Webpage)
|
||||
- (POST) `/uploadCurl` (Uploads file from CURL)
|
||||
|
||||
Ex:
|
||||
```
|
||||
curl http://localhost:8088/uploadCurl -F add=@test.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Peernet Download file</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="ftco-section">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10">
|
||||
<div class="wrap d-md-flex">
|
||||
<div class="text-wrap p-4 p-lg-5 text-center d-flex align-items-center order-md-last">
|
||||
<div class="text w-100">
|
||||
<h2 class="Peernetblue">Download this file from Peernet</h2>
|
||||
<a href="#" style="color:#3ac4e2">Download from the browser</a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="#" class="btn btn-white btn-outline-white">Download from Peernet Browser</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-wrap p-4 p-lg-5">
|
||||
<div class="d-flex">
|
||||
<div class="w-100">
|
||||
<h3 class="mb-4">File information</h3>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<form action="#" class="signin-form">
|
||||
<div class="form-group mb-3">
|
||||
<label class="label" for="name">File Name:</label>
|
||||
<p>Test.txt</p>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label class="label" for="name">File Size:</label>
|
||||
<p>15 Mb</p>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label class="label" for="name">File Hash:</label>
|
||||
<p>blablablablabla</p>
|
||||
</div>
|
||||
<!-- <div class="form-group mb-3">
|
||||
<label class="label" for="password">Password</label>
|
||||
<input type="password" class="form-control" placeholder="Password" required>
|
||||
</div><div class="form-group mb-3">
|
||||
<label class="label" for="name">File Name:</label>
|
||||
<p>Test.txt</p>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="form-group d-md-flex">
|
||||
<!-- <div class="w-50 text-left">
|
||||
<label class="checkbox-wrap checkbox-primary mb-0">Remember Me
|
||||
<input type="checkbox" checked>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="w-50 text-md-right">
|
||||
<a href="#">Forgot Password</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/popper.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user