.
This commit is contained in:
@@ -451,6 +451,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function blobToBase64(blob) {
|
||||||
|
return new Promise((resolve, _) => {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onloadend = () => resolve(reader.result);
|
||||||
|
reader.readAsDataURL(blob);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function readFileAndProcess2(callback) {
|
async function readFileAndProcess2(callback) {
|
||||||
|
|
||||||
file_set = $("#image_form_set input[type=file]");
|
file_set = $("#image_form_set input[type=file]");
|
||||||
@@ -471,6 +479,7 @@
|
|||||||
let imageId;
|
let imageId;
|
||||||
if (el.files[0].type.startsWith("image")) {
|
if (el.files[0].type.startsWith("image")) {
|
||||||
imageId = `${url}`;
|
imageId = `${url}`;
|
||||||
|
imageId = blobToBase64(url);
|
||||||
} else {
|
} else {
|
||||||
imageId = `wadouri:${url}`;
|
imageId = `wadouri:${url}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user