Home > Mobile >  {"msg":"Current request is not a multipart request","code":500}
{"msg":"Current request is not a multipart request","code":500}

Time:03-25

The form works with postman, but it doesn't work in server and local. The error is in the subject title.

<form  action="POST">
            <div >
                <label for="withdraw-address" > Withdraw Address </label>
                <input name="withdraw-address" type="text"  id="withdraw-address">
            </div>
            <div >
                <label for="receive-address" > Receive Address</label>
                <input name="receive-address" type="text"  id="receive-address">
            </div>
            <div >
                <label for="quanity" > Quanity </label>
                <input name="quanity" type="text"  id="quanity">
            </div>
            <div >
                <label for="remark" >Remark</label>
                <input name="remark" type="text"  id="remark">
            </div>
            <div >
                <label for="withdraw-snapshot" >Withdraw Snapshot</label>
                <input name="withdraw-snapshot" type="file"  id="withdraw-snapshot" aria-describedby="inputGroupFileAddon04" aria-label="Upload">
            </div>
            <button type="submit" >Submit</button>
        </form>

CodePudding user response:

change this line

<form  action="POST">

to

<form  action="POST" enctype="multipart/form-data">

then issue is solved.

CodePudding user response:

If the form includes multipart data (multi-media data eg. files) make sure you change the 'enctype' from "application/x-www-form-urlencoded" (default) to "multipart/form-data".

  • Related