Update AB/index.html
Browse files- AB/index.html +11 -9
AB/index.html
CHANGED
@@ -256,17 +256,18 @@ h1 {
|
|
256 |
}
|
257 |
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
const
|
264 |
-
|
265 |
-
|
|
|
|
|
266 |
}
|
267 |
|
268 |
|
269 |
-
|
270 |
async function uploadFile() {
|
271 |
const sourceFileInput = document.getElementById('sourceFile');
|
272 |
const resultContainer = document.getElementById('resultContainer');
|
@@ -302,7 +303,7 @@ h1 {
|
|
302 |
// If successful response, display the result image
|
303 |
const blob = await response.blob();
|
304 |
|
305 |
-
|
306 |
|
307 |
|
308 |
} else {
|
@@ -331,3 +332,4 @@ h1 {
|
|
331 |
</script>
|
332 |
</body>
|
333 |
</html>
|
|
|
|
256 |
}
|
257 |
|
258 |
|
259 |
+
// Function to display the processed image
|
260 |
+
function displayResultImage(url) {
|
261 |
+
const resultContainer = document.getElementById('resultContainer');
|
262 |
+
// Create an image element
|
263 |
+
const img = document.createElement('img');
|
264 |
+
// Set the source attribute to the processed image URL
|
265 |
+
img.src = url;
|
266 |
+
// Append the image element to the result container
|
267 |
+
resultContainer.appendChild(img);
|
268 |
}
|
269 |
|
270 |
|
|
|
271 |
async function uploadFile() {
|
272 |
const sourceFileInput = document.getElementById('sourceFile');
|
273 |
const resultContainer = document.getElementById('resultContainer');
|
|
|
303 |
// If successful response, display the result image
|
304 |
const blob = await response.blob();
|
305 |
|
306 |
+
displayResultImage(url);
|
307 |
|
308 |
|
309 |
} else {
|
|
|
332 |
</script>
|
333 |
</body>
|
334 |
</html>
|
335 |
+
|