Skip to content
Snippets Groups Projects

feat/add preview of image in workout if image file

Merged Haakon Gunleiksrud requested to merge feat/display_workout_image into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
@@ -42,6 +42,15 @@ async function retrieveWorkout(id) {
a.text = pathArray[pathArray.length - 1];
a.className = "me-2";
filesDiv.appendChild(a);
let isImage = ["jpg", "png", "gif", "jpeg"].includes(a.text.split(".")[1]);
if(isImage){
let img = document.createElement("img");
img.src = file.file;
img.width = "500";
filesDiv.appendChild(img);
}
}
// create exercises
Loading