Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
Line 9: The URL path "rainbow.jpg" does not exist. Try adding the following constant and update the line with the fetch as follows: const rainbow = "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Double-alaskan-rainbow.jpg/400px-Double-alaskan-rainbow.jpg" fetch(rainbow) Line 14: The Url object should be all caps: Change: .src=Url.createObjectURL(blob) To: .src=URL.createObjectURL(blob)
24th May 2019, 4:21 AM
David Carroll
David Carroll - avatar
+ 5
David Carroll You are absolutely correct, my last comment was not necessary, good catch Coder My bad on the half-ass advice. I will remove my earlier replies
24th May 2019, 4:37 AM
ODLNT
ODLNT - avatar
+ 3
Coder What specifically are you trying to do? I'm not sure what you mean by: "how to take data off text file?"
24th May 2019, 4:42 AM
David Carroll
David Carroll - avatar
+ 2
Coder Line 14 still needs to be updated. Use the following: document.getElementById("rainbow").setAttribute("src",URL.createObjectURL(blob)); or document.getElementById("rainbow").src = URL.createObjectURL(blob);
24th May 2019, 4:34 AM
David Carroll
David Carroll - avatar
+ 2
Coder What I'm trying to figure out is, what you want to do after you fetch the text file? Do you plan to read the text file and output the contents to the web page or maybe save to a database? Or will you save the file to disk? I'm just trying to get the bigger picture to give the proper response.
24th May 2019, 5:06 AM
David Carroll
David Carroll - avatar
0
Helli
25th May 2019, 12:21 AM
Rzw