Closed haozi23333 closed 8 years ago
In your example what is sj.file
are you sure it is a valid file ? Can you inspect the payload data on the request on post it here ?
@m4nuC I have met same problem... In this way I can not get files but fields have value
{
"------WebKitFormBoundaryeKsggfjo2wYJ61ny\r\nContent-Disposition: form-data; name": "\"orderIn\"; filename=\"a.json\"\r\nContent-Type: application/json\r\n\r\n{\n \"type\": \"object\",\n \"$id\": \"https://mqliutie.com/schemas/a.json\",\n \"properties\": {\n \"api\": {\n \"type\": \"string\"\n },\n \"data\": {\n \"type\": \"object\",\n \"properties\": {\n \"activityStartTime\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"required\": [\n \"api\"\n ]\n}\r\n------WebKitFormBoundaryeKsggfjo2wYJ61ny\r\nContent-Disposition: form-data; name=\"userName\"\r\n\r\nuserName diy\r\n------WebKitFormBoundaryeKsggfjo2wYJ61ny--\r\n"
}
If upload in another way I can get the files
this files is empty use koa-router and async-busboy
whit demo