This commit is contained in:
2018-07-12 22:41:45 +03:00
commit 21f9030e27
15 changed files with 431 additions and 0 deletions

7
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
static/js/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
static/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

27
static/js/custom.js Normal file
View File

@@ -0,0 +1,27 @@
$(document).ready(function(){
$('#upload-file-btn').click(function(){
var input = document.querySelector('input[type="file"]');
var data = new FormData();
data.append('file', input.files[0]);
fetch('/upload', {
method: 'POST',
body: data,
})
.then(function(data){
switch(data.status) {
case 200:
window.location = data.url;
break;
case 400:
console.log("Upload failed");
break;
case 415:
console.log("Wrong file format");
break;
}
});
});
});

2
static/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long