Modify the FileUpload.csp in simple_example to avoid CORS (#573)

This commit is contained in:
Elwin.Zhu 2020-09-15 16:20:56 +08:00 committed by GitHub
parent 4c9463eeb7
commit 3222c0df84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
//File uploading method
function UpladFile() {
var fileObj = document.getElementById("file").files[0]; // js get file object
var url = "http://localhost:8848" + "/api/attachment/upload";
var url = "/api/attachment/upload";
var form = new FormData(); // FormData object
form.append("file", fileObj); // File object
@ -84,4 +84,4 @@
<input type="button" onclick="UpladFile()" value="Upload" />
<input type="button" onclick="cancleUploadFile()" value="Cancel" />
</body>
</html>
</html>