Add file upload
This commit is contained in:
parent
2f49e6aa8a
commit
aa493a0b51
@ -546,7 +546,7 @@ function uploadFile() {
|
||||
formData.append('userfile', file);
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '__URL__', true);
|
||||
xhr.open('POST', '/upload', true);
|
||||
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
|
||||
<page minimal_permission_level="2" secret="yes" page_title="Súbory" action="/upload"></page>
|
||||
<page minimal_permission_level="2" secret="yes" page_title="Súbory"></page>
|
||||
<form id="uploadForm" enctype="multipart/form-data" method="POST">
|
||||
<label for="fileInput">Send this file: </label>
|
||||
<input type="hidden" name="action" value="uploadFiles">
|
||||
|
Loading…
Reference in New Issue
Block a user