asp.net-core - 请告诉我如何上传 Summernote 的文字图片
问题描述
前端使用 angular 6,api 使用 asp.net core。当您将图像添加到正文时,它会要求 api 将文件保存在服务器上。顺便说一句,保存数据时,它被保存为base64字节。数据库应使用 Oracle 存储在 4000 字节以下。有没有办法通过图片路径上传图片?希望大家能告诉我angular例子中uploadImagePath回调函数的写法。
config: any = {
airMode: false,
tabDisable: true,
placeholder: '내용을 입력하세요.',
tabsize: 2,
height: '300px',
uploadImagePath: this.REST_API_ADDR + 'File/summernote',
popover: {
table: [
['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
['delete', ['deleteRow', 'deleteCol', 'deleteTable']],
],
image: [
['image', ['resizeFull', 'resizeHalf', 'resizeQuarter', 'resizeNone']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']],
],
link: [['link', ['linkDialogShow', 'unlink']]],
air: [ ['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear',],],],
},
toolbar: [
['misc', ['codeview', 'undo', 'redo']],
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
['fontsize', ['fontname', 'fontsize', 'color']],
['para', ['style', 'ul', 'ol', 'paragraph', 'height']],
['insert', ['table', 'picture', 'link', 'video', 'hr']],
],
fontNames: ['Helvetica', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Roboto', 'Times'],
}
解决方案
推荐阅读
- awk - GAWK 使用 -i inplace 选项将字符串打印到 STDOUT
- workflow - 如何将 Watson Knowledge Catalog (WKC) 连接到我的 Oracle Cloud ATP 数据库?
- python - 删除了 jupyter 笔记本单元格 - 有没有办法从仍在内存中的对象返回代码?
- angular - 使用 Angular 自定义电子邮件验证
- shell - 在活动窗口中的选定字段中填充文本 - VBScript、WScript.Shell
- python - 使用 Pandas 根据另一列的值选择一列
- syncfusion - SyncFusion Xamarin:根据内容自动生成 PDF 页面
- python-3.x - 连接 Pandas 数据帧,获取第一个数据帧的 Nan 值
- ios - 在 Apple Watch App 中通过 OAuth 2.0 实现 Slack 授权
- python - 匹配文本后打印行