Skip to content

Commit ed137ec

Browse files
save file
1 parent 35487c5 commit ed137ec

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

libs/js/io/file-server/file-server.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,19 @@ <h1>
107107

108108
<code>
109109

110-
fetch('https://localhost:3000/a.txt',{headers:{mode:'load',auth:'my-auth'}})
110+
var fs = await import();
111+
112+
fs.url = 'localhost';
113+
fs.port = 3000;
114+
fs.auth = 'my-auth';
115+
116+
var {blob,error} = await fs.file.load('a.txt');
117+
if(error){
118+
console.error(error);
119+
return;
120+
}
121+
var txt = await blob.text();
122+
console.log(txt);
111123

112124
</code>
113125

0 commit comments

Comments
 (0)