Rename loadImage to loadImageBase64 for clarity
This commit is contained in:
parent
16893b52b1
commit
0e80c0d5d0
@ -331,7 +331,7 @@ class DictionaryImporter {
|
|||||||
|
|
||||||
let image;
|
let image;
|
||||||
try {
|
try {
|
||||||
image = await mediaUtility.loadImage(mediaType, content);
|
image = await mediaUtility.loadImageBase64(mediaType, content);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`Could not load image at path ${JSON.stringify(path)} for ${errorSource}`);
|
throw new Error(`Could not load image at path ${JSON.stringify(path)} for ${errorSource}`);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ const mediaUtility = (() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadImage(mediaType, content) {
|
function loadImageBase64(mediaType, content) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const image = new Image();
|
const image = new Image();
|
||||||
const eventListeners = new EventListenerCollection();
|
const eventListeners = new EventListenerCollection();
|
||||||
@ -70,6 +70,6 @@ const mediaUtility = (() => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
getImageMediaTypeFromFileName,
|
getImageMediaTypeFromFileName,
|
||||||
loadImage
|
loadImageBase64
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user