代码
提交代码
<form action="/user/settings/avatar" method="post" enctype="multipart/form-data"> <div> <label for="avatar">选择新的头像</label> <input name="avatar" type="file"> </div> </form>
运行结果