I was used ReactJS version of Froala WYSIWYG Editor. When I use Image Upload feature, I can't get the params at server request.
This is config:
this.config = {
// Set the image upload parameter.
imageUploadParam: 'image',
// Set the image upload URL.
imageUploadURL: apiUrl + "/api/v1/admin/upload/image",
// Additional upload params.
imageUploadParams: {
token: cookie.getItem('token'),
test_id: '11',
},
// Set request type.
imageUploadMethod: 'POST',
// Set max image size to 2MB.
imageMaxSize: 2 * 1024 * 1024,
// Allow to upload PNG and JPG.
imageAllowedTypes: ['jpeg', 'jpg', 'png', 'gif'],
}
When uploading an image I receive the following message:
{"code":403,"message":"Token is not valid!"}
I checked the request entry:
console.log(request.body);
Result: {}
console.log(request.query);
Result: {}
console.log(request.params);
Result: {}
Did I miss something or is the Config section wrong?