When i upload an image with the MDEditor, the alert box notify me that the csrf token was not present, so i look at the request header and i see that the uploaderData was not added to the formData
Configuration form the MDEditor
var token = $("meta[name='csrf-token']").attr("content");
var md = new MdEditor('#mdeditor', {
uploader: "#{admin_attachments_path}",
uploaderData: {
authenticity_token: token,
attachable_type: 'Post',
attachable_id: "#{@post.id}"
},
preview: true
});
Request Header can be found here
Error log can be found here
When i upload an image with the MDEditor, the alert box notify me that the csrf token was not present, so i look at the request header and i see that the uploaderData was not added to the formData
Configuration form the MDEditor
Request Header can be found here Error log can be found here