Commit 83a6d913 by Sergey

fix

parent e6bf3b87
......@@ -2,18 +2,6 @@ import { Extension } from "@tiptap/core";
import { Plugin, PluginKey } from 'prosemirror-state'
import axios from 'axios'
function dataURItoBlob(dataURI) {
let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // тип пантомимы
let byteString = atob(dataURI.split(',')[1]); // декодирование base64
let arrayBuffer = new ArrayBuffer(byteString.length); // Создаем буферный массив
let intArray = new Uint8Array(arrayBuffer); // Создаем представление
for (var i = 0; i < byteString.length; i++) {
intArray[i] = byteString.charCodeAt(i);
}
return new Blob([intArray], {type: mimeString});
}
const upload = async (file) => {
let formData = new FormData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment