Skip to content

Commit db86f60

Browse files
committed
Update live-view.js
1 parent 3f86c8b commit db86f60

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

live-view/live-view.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,15 @@ async function handleLiveViewRequest(requestPath) {
844844
// return modified file content
845845
respContent = modFile.content;
846846

847+
// decode base64 file with browser
848+
const dataURL = 'data:application/octet-stream;base64,' + respContent;
849+
850+
// send (instant) request
851+
const response = await fetch(dataURL);
852+
853+
// get data from response
854+
respObj = (await (response.body.getReader()).read()).value;
855+
847856
} else {
848857

849858
let respObj;

0 commit comments

Comments
 (0)