.
This commit is contained in:
@@ -467,6 +467,21 @@
|
||||
const readFile = (file, el) => {
|
||||
reader(file).then(reader => {
|
||||
console.log("12345", reader)
|
||||
|
||||
if (reader.result.startsWith("data:application/octet-stream;base64")) {
|
||||
const element = $("<div class='temp-thumb'></div>").get(0)
|
||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||
file
|
||||
);
|
||||
cornerstone.enable(element);
|
||||
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
||||
cornerstone.displayImage(element, image);
|
||||
cornerstone.resize(element)
|
||||
|
||||
});
|
||||
$(el).parent().parent().prepend(element);
|
||||
|
||||
} else {
|
||||
var image = new Image();
|
||||
image.height = 100;
|
||||
image.title = file.name;
|
||||
@@ -475,18 +490,9 @@
|
||||
$(el).parent().parent().find(".temp-thumb").remove();
|
||||
$(el).parent().parent().prepend(image);
|
||||
//images.push(reader.result);
|
||||
}
|
||||
|
||||
|
||||
const element = $("<div class='thumb'></div>").get(0)
|
||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||
file
|
||||
);
|
||||
cornerstone.enable(element);
|
||||
cornerstone.loadAndCacheImage(imageId).then(function(image) {
|
||||
cornerstone.displayImage(element, image);
|
||||
|
||||
});
|
||||
$(el).parent().parent().prepend(element);
|
||||
|
||||
|
||||
active_file_inputs.delete(el)
|
||||
|
||||
Reference in New Issue
Block a user