我的夏令时在成功发布时无法在我的编辑器中插入图像
但我目录中的上传文件是成功的
有我的代码:
$(document).ready(function() {
$('textarea').summernote({
height: 200,
width : 600,
callbacks: {
onImageUpload: function(files){
that = $(this);
sendFile(files[0], that);
}
}
});
function sendFile(file, that){
var data = new FormData();
data.append('file', file);
$.ajax({
data: data,
type: 'post',
url: "{{ URL('upload_image') }}",
cache: false,
contentType: false,
processData: false,
success: function(url){
console.log('sukses');
$(that).summernote('insertImage', location.origin+'/'+url, '')
}
});
}
});
我在后端使用laravel