<html>
<script src="https://common.cnblogs.com/scripts/jquery-2.2.0.min.js"></script>
<body>
<form id="upload" enctype="multipart/form-data" method="post">
    <input type="file" name="file" id="pic"/>
    <input type="button" value="提交" onclick="uploadPic();"/>
    <span class="showUrl"></span>
</form>

<script>
    function uploadPic() {
        var form = document.getElementById('upload');
        var formData = new FormData(form);
        $.ajax({
            url: "http://localhost:8083/up/file",
  