in the backward request, if there is a file object in the uploaded data, we need to use the form submission, at this time we need to convert the JSON object into a formData object, see the code
for details const formData = new FormData();
Object.keys(params).forEach((key) => {
formData.append(key, params[key]);
});
may also require formData to be converted to JSON, the code is as follows:
var jsonData = {};
formData.forEach((value, key) => jsonData[key] = value);
div>
Read More:
- Object is JSON, and JSON is converted to object
- Object of type timestamp is not JSON serializable
- The background object of thymeleaf is null, which solves the problem of error when the object is empty to get the property value
- To solve the problem of C # calling excel interface error, prompt: the COM object of Microsoft. Office. Interop. Excel. Applicationclass is forcibly converted to the interface type “Microsoft. Offi”
- Type error: the JSON object must be STR, bytes or byte array, not ‘textiowrapper’
- TypeError: ‘numpy.int64′ object is not iterable ,’int’ object is not iterable
- How to Use the object of ES6 to clear the object value
- Ubuntu: Failed to initialize compiler: object java.lang.Object In compiler mirror not found
- In Java, int is converted to string, and zero is added before the number of bits is insufficient
- Python 3 error typeerror: ‘dict’_ keys‘ object is not subscriptable
- R language error:‘ namespace:lazyeval There is no exit_ The object is eval
- TypeError: ‘int’ object is not iterable
- Type error: object (…) is not a function
- “class“ object is not subscriptable
- Attributeerror: ‘STR’ object has no attribute ‘decode’ solution: the pro test is successful.
- [Solved] ERROR Error: No module factory availabl at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST ‘Error
- TypeError: this.getOptions is not a function at Object.lessLoader
- Typeerror in Python: ‘nonetype’ object is not Iterable
- Python error: typeerror: ‘Int’ object is not subscribable
- Type error at XXX ‘set’ object is not reversible