Conversion_Kitchen_Code/kitchen_counter/mnfapp/templates/mnfapp/uploadfiles.html

76 lines
2.7 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Uploading</title>
</head>
<style>
.container-995{
border: 5px solid;
margin: auto;
width: 50%;
padding: 10px;
text-align: center;
}
</style>
<body>
<div class="container-995">
<div class="card-body">
<h3 class="mb-5 title_heading primary-heading">Welcome to the Blockchain room!</h3>
<div id="font-size">
</div>
<div class="d-flex justify-content-center">
<div>
</div>
</div>
<form id="form1" action="{%url 'upload_on_node' %}" method="POST" enctype="multipart/form-data">
{%csrf_token%}
<div class="center input_fields_container_narration">
<h3 id="pitchdeck-narration-title" class="sub-heading">Upload on blockchain !</h3>
<span for="file-input" class="sub-para">(Please select your file )</span>
{%csrf_token%}
<input class="choose" type="file" name="scriptss" id="docFile" onchange="removeHyphens()" /><br><br>
<label for="">Please insert a file id</label> <br><br>
<input class="" type="text" name="script_id" id="script_id"required/><br><br>
<input type="hidden" name="form_identifier" value="submit_form1">
</div>
<div class="text-center">
<button class="btn btn-primary btn-file btn-next primary-btn-greeen" type="submit" id="submit-btn"
onclick="localStorage.clear()">upload</button>
</div>
<div>
<h3>file cid is {{hash}}</h3>
<h3>file tx_hash is {{tx_hash}}</h3>
</div>
</form><br><br>
<form action="{%url 'upload_on_node' %}" method="GET" enctype="multipart/form-data">
<div>
<h1 id="pitchdeck-narration-title" class="sub-heading">Download From blockchain !</h1><br>
<h3>your private_key is -> 2c8db4da45123baedc14d7a136bf094f59d0ff382c6647ef3ad079404a466b03</h3><br><br>
<label for="">Please insert your file_id</label><br>
<input type="text"name="file_id"required> <br>
<label for="">Enter Your Private Key</label><br>
<input type="text" name="private_key" required><br><br><br>
<div class="text-center">
<button class="btn btn-primary btn-file btn-next primary-btn-greeen" type="submit" id="submit-btn"
>Download</button>
</div>
</div>
<script>
cid= "{{cid_hash}}"
if(cid !==''){
window.location.href = `http://1.6.141.104/ipfs/${cid}`
}
else{
console.log("cid_hash not found")
}
</script>
</form>
</div>
</div>
</body>
</html>