mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 02:24:26 +00:00
Remove shitty AJAX upload
This commit is contained in:
parent
da35292cd5
commit
1c5e658e4b
@ -52,30 +52,4 @@
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
$("form").submit(function (event) {
|
||||
event.preventDefault();
|
||||
var formData = new FormData($(this)[0]);
|
||||
var formKeys = formData.keys();
|
||||
var formEntries = formData.entries();
|
||||
|
||||
$.ajax({
|
||||
url: '',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (returndata) {
|
||||
alert("Upload OK!");
|
||||
},
|
||||
error: function () {
|
||||
alert("Upload failed");
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user