This is a very pretty form, and it shows a percentage bar progressing every 100 milliseconds, but if you want to track the actual progress of a file upload to a website you need a bit more code. There are TH-cam tutorials on how to do that, but the principle is that you need to PreventDefault on submitting the form. You can attach the upload file to the form as form data. Something like let formdata = new FormData(); formdata.append("file", formdata); Next you need to create an XMLHttpRequest and add an EventListener to that. The event you are listening for is "progress" and that comes back from the website. With the event.total and event.loaded you can calculate percent progress and use that to update the value of the element. There are some good tutorials out there, but I have not found one that explains everything you need in a beginner-friendly way.
I might be missing something but I can't see any code to actually upload the file. The form nicely gets the attributes of the file and increments a progress indicator, but it is not actually uploading a file as far as I can see.
hello, i like your work but why is it that the javascript does not work on our sides? Is the code you display in the video the one you run or you run another code else where similar to the one you are making on the screen?🤷♂
Can you please share this code? I've tried putting in this exact code and everything seems to work until minute count 11:40 where you browse and select the file. Nothing happens at that point, no file is selected, name, size isn't working. Can you please share the code?
@@tajulraziq7276 Tried that, still got same result. Can you possibly send me your code, maybe I'm missing some other mistakes or something, I don't know? I would really love for this to work.
This is a very pretty form, and it shows a percentage bar progressing every 100 milliseconds, but if you want to track the actual progress of a file upload to a website you need a bit more code. There are TH-cam tutorials on how to do that, but the principle is that you need to PreventDefault on submitting the form. You can attach the upload file to the form as form data. Something like let formdata = new FormData(); formdata.append("file", formdata); Next you need to create an XMLHttpRequest and add an EventListener to that. The event you are listening for is "progress" and that comes back from the website. With the event.total and event.loaded you can calculate percent progress and use that to update the value of the element. There are some good tutorials out there, but I have not found one that explains everything you need in a beginner-friendly way.
I might be missing something but I can't see any code to actually upload the file. The form nicely gets the attributes of the file and increments a progress indicator, but it is not actually uploading a file as far as I can see.
Good 👏👏👏👏
Wow nice
❤
Can you make tutorial about pagination with vanilla javascript ?
Yes watch upcoming video and subscribe this channel
Why is my button not working for upload 😢 please help me, I'm going crazy
what if i upload docx, pdf and zip. will it work?
Javascript not working, can you send me the code by any given link
hello, i like your work but why is it that the javascript does not work on our sides? Is the code you display in the video the one you run or you run another code else where similar to the one you are making on the screen?🤷♂
you have to give the source for your script and jquery
Can you please share this code? I've tried putting in this exact code and everything seems to work until minute count 11:40 where you browse and select the file. Nothing happens at that point, no file is selected, name, size isn't working. Can you please share the code?
me too
- correct the spelling "getElementByTagName" to "getElementsByTagName"
- change the "let load 0" to "let load = 0"
@@tajulraziq7276 Tried that, still got same result. Can you possibly send me your code, maybe I'm missing some other mistakes or something, I don't know? I would really love for this to work.
how can we automatically upload on uploading?
uplaod the code
fiz aqui e so mudei o nome de variaveis e nao deu certo.
damn, mine doesnt count from 0 to 100
I need code to this one, very well made.
hello, Are you received it?
@@hadidiab9680 I haven’t received any code yet, do you have it working?
I want this code by reference
i need a code