Upload on 404 and attachment response header
parent
630f9220f3
commit
53d5794c96
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>bog</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
function upload() {
|
||||
var file = document.getElementById('file').files[0];
|
||||
var ajax = new XMLHttpRequest;
|
||||
|
||||
const reader = new FileReader();
|
||||
ajax.open('POST', '', true);
|
||||
|
||||
ajax.overrideMimeType('text/plain; charset=x-user-defined-binary');
|
||||
reader.onload = function(evt) {
|
||||
ajax.send(evt.target.result);
|
||||
};
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
</script>
|
||||
<input id="file" type="file" />
|
||||
<input type="button" onClick="upload()" value="Upload">
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue