-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin.html
58 lines (45 loc) · 2.06 KB
/
admin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
<title>LE TITLE!!! </title>
</head>
<style>
</style>
<body>
<!-- <input id="csv-file" type="file" /> -->
<!-- <button id="send">Send</button> -->
<!-- <script src="js/vendor/jquery.js"></script>
<script type="text/javascript"> -->
<!-- console.log("HERE"); -->
//<!-- $("#send").click(sendData(document.getElementById("csv-file").value));
// // $("#send").click(sendData(document.getElementById("csv-file").value));
// console.log("NOW IM FRIGKEN HERE: " + document.getElementById("csv-file").value);
// function sendData(data) {
// var XHR = new XMLHttpRequest();
// var FD = new FormData();
// console.log(XHR + "-- this is XHR");
// // Push our data into our FormData object
// for(name in data) {
// FD.append(name, data[name]);
// }
// // Set up our request
// XHR.open('POST', 'http://kalbot-api.us-east-1.elasticbeanstalk.com/conversations/set');
// console.log('post sent!!');
// // Send our FormData object; HTTP headers are set automatically
// XHR.send(FD);
// console.log('post sent!!');
// } -->
<!-- // var data = new FormData();
// $("#send").click(jQuery.each("document.getElementById('csv-file').value", function(i, file) {
// data.append('file-'+i, file);
// })); -->
<form method="POST" action="http://kalbot-api.us-east-1.elasticbeanstalk.com/conversations/set" enctype="multipart/form-data">
<input type="file" name="file" /><br/><br/>
<input type="submit" value="Submit" />
</form>
<!-- </script> --> <!-- might need this to be triggered by an event? Idk if it would automagically post after the image is uploaded. NOTE: callback (3rd entry) is not necessary, so do I remove the last comma or leave it null? -->
<!--$("#send").click(function(){
$.post("http://kalbot-api.us-east-1.elasticbeanstalk.com/conversations/set", document.getElementById("csv-file").value);
}) -->
</body>
</html>