'csrf_autoload' => true,
// 'csrf_autoload_methods' => array('post', 'put', 'delete'),
// 'csrf_bad_request_on_fail' => true,
'csrf_auto_token' => true,
'csrf_token_key' => '_token',
'csrf_expiration' => 1 * 60 * 60,
data = new FormData();
data.append( '_token', fuel_csrf_token() );
data.append( 'image', images );
$.ajax( {
data: data,
datatype: 'JSON',
type: 'POST',
url: controller.editor.data( 'image-handler-url' ),
cache: false,
contentType: false,
processData: false,
success: function( url ) {
controller.editor.insertImage(url)
},
error: function( r ) {
alert( r.responseJSON );
},
} );
It looks like you're new here. If you want to get involved, click one of these buttons!