| | |
| | | |
| | | BraftEditor.use(Table()) |
| | | |
| | | let service = '' |
| | | if (process.env.NODE_ENV === 'production') { |
| | | service = document.location.origin + '/' + window.GLOB.service |
| | | } else { |
| | | service = window.GLOB.location + '/' + window.GLOB.service |
| | | } |
| | | |
| | | class NormalEditor extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, |
| | |
| | | if (initVal) { |
| | | try { |
| | | initVal = window.decodeURIComponent(window.atob(initVal)) |
| | | } catch { |
| | | } catch (e) { |
| | | initVal = this.props['data-__meta'].initialValue || null |
| | | } |
| | | } |
| | |
| | | if (encryption === 'true') { |
| | | try { |
| | | val = window.btoa(window.encodeURIComponent(val)) |
| | | } catch { |
| | | } catch (e) { |
| | | val = editorState.toHTML() |
| | | } |
| | | } |
| | |
| | | form.append('file', _param.binary) |
| | | form.append('fileMd5', params.file.fileMd5) |
| | | form.append('shardingMd5', _param.chunkMd5) |
| | | form.append('baseDomain', service) |
| | | form.append('baseDomain', window.GLOB.baseurl) |
| | | form.append('rootPath', 'Content/images/upload/') |
| | | form.append('fileName', params.file.fileName) |
| | | form.append('fileExt', params.file.fileType) |
| | | form.append('shardingCnt', _param.chunks) |
| | | form.append('shardingNo', _param.chunk) |
| | | form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') |
| | | form.append('UserID', sessionStorage.getItem('UserID') || '') |
| | | |
| | | Api.getLargeFileUpload(form).then(res => { |
| | | if (res.status) { |