Vanilla Multiple File Upload Progress Bar Tutorial JS Ajax PHP

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 103

  • @MyStudio-io3so
    @MyStudio-io3so 3 года назад +2

    Tis guy is the best tutor i have ever seen. Once again another great video made simple to understand. I subscribe because this is truly the best video on this topic. In fact all of his videos that I have seen from him on js is the best I have ever seen. Thanks for this. THANK YOU VERY MUCH. GREAT TEACHER.

    • @AdamKhoury
      @AdamKhoury  3 года назад +1

      Thanks for the kind feedback Andy. Such a nice comment that I pinned it to the top. Everyone's comments are so nice... gives me the warm fuzzies. You guys rock.

    • @MyStudio-io3so
      @MyStudio-io3so 3 года назад

      @@AdamKhoury Good day Adam, thanks for your response. With the help of your videos I am able to build my CMS. I can now afford for a client to log in and edit their own website. I also like how you created the function for the js getdoc with the underscore, I also like the ajax module. Do you have any videos on how to build a logins system and session with Node.js? I have tried using Node.js before and did not really understand how to do this in Node.js so I stop learing Node, but I find PHP easier to use for creating sessions and login as well as sign up. Maybe you can consider doing a video on it using Node.js. I think that will bring many views. You truly deserve all the views and subscription you get. Thanks again for the many videos. I hope one day I will be competent enough to get a job as a software engineer. Thanks again. By the way you can also do a video on software enginerring about what it is and what it takes to be one. Also i have created my first electron app a calculator. So I think I undersatand Electron but I will still like to see you teach Electron because i feel it will be better than any other videos on the topic as well. Electron has given JS super powers because it is now a complete language and not just a scripting language.

  • @OstonCodeCypher
    @OstonCodeCypher 4 года назад +27

    woooow....this voice has once again put a smile on my face...Welcome Back Khoury

  • @kambaalayashwanth123
    @kambaalayashwanth123 4 года назад +17

    started my dev career with your channel, thank you adam

    • @AdamKhoury
      @AdamKhoury  4 года назад +5

      You're welcome sir, glad to be a part of your journey.

    • @patrickminega120
      @patrickminega120 3 года назад +1

      Me too. Whenever I lose motivation I come back to this channel

  • @g-luu
    @g-luu 4 года назад +2

    oh man, I remember this voice like yesterday. You helped me a lot in university. it's been 5years since I've graduated. Thank you sir.

  • @cyberolla
    @cyberolla 4 года назад +25

    The king is back

  • @kevinwiens4804
    @kevinwiens4804 3 года назад +1

    AJAX on the "Client side" and PHP on the "sever side" feels just like old times Adam,
    ***Thank you Adam for coming back*** I am so glad. Your code is always "perfect"
    And actually works! You have taught me so much! Much RESPECT and Praise..
    You do it all :
    For free.. a True Pioneer for the Love of Coding..
    While you were giving it all away, your vast knowledge and experience,
    way before everyone else started. Welcome home..

  • @MichaelProstka
    @MichaelProstka 4 года назад +2

    I appreciate having to go line-by-line and type it in like we used to :) I've always felt that makes for deeper understanding. You rock, Adam!

  • @rotrose7531
    @rotrose7531 4 года назад +2

    I am so happy u are back again, back to 5 years ago, your tutorials helped me a lot to find my first web related job. Welcome!

  • @amanpanchal5915
    @amanpanchal5915 4 года назад +2

    Welcome back Mr. Adam Khoury. We missed your tutorials a lot. Your tutorials are the best 😘. Keep making it.

  • @ahbrahim2
    @ahbrahim2 4 года назад +1

    Is good to have you back on RUclips as you always give a useful tutorial.

  • @mehrdadpartow3122
    @mehrdadpartow3122 2 года назад

    It's excellent!
    One of the great features you have is that you showed most of the important things to work with Ajax in the video and you didn't use any programming libraries for JavaScript or PHP. (Vanilla programming is very advanced)

  • @nicholasdittmer4494
    @nicholasdittmer4494 4 года назад

    Adam. I just did web intersect 2.0 and the immortal E-Commerce courses for the 1000th time. You are one of THE best teachers out there (my websites have been quite successful). Your projects are amazing, fun and pertinent to todays cutting edge expectations. Most Javascript tutorials send me to sleep but yours inspire me with real artistic enthusiasm. You have been my teacher for many years. I wish I had said something sooner. You really fucking rock man

  • @AmitMali
    @AmitMali 4 года назад +2

    I learned from your channel years ago, I worked, founded my own firm, got married, and have 1 child. nut how my you know it might be a second as you were so in a quantum world

  • @javaholiday
    @javaholiday 4 года назад

    Great Adam, You are the real Teacher online. I love PHP and I growth up with your tutorial. salam.

  • @aaronvandyke2597
    @aaronvandyke2597 3 года назад

    WHY haven't I been a subscriber to this channel for the last four years?!?!?!?!

  • @Timespider
    @Timespider 4 года назад +2

    Adam, I've liked your free codes over the years and if I'm honest that's part of the reason I kept coming back, they really helped me out But I can do without them now I've got more knowledge. The other reasons would be your sense of humor and the simple way you explain things in your videos. I've always watched your entire videos. I actually had my Christmas ribbon graphic out the other day which you did a tutorial back when Fireworks was still be supported(I still use it)
    I used your original multiple file upload tutorial to build my own CRUD CMS that created directories (mkdir())and deleted files (unlink()) etc. I expanded it a lot. Back then it made my brain explode but your correct when you say you feel good after creating things yourself(well almost myself).
    Can't wait for your new tutorials.

    • @AdamKhoury
      @AdamKhoury  4 года назад +3

      Thanks for the kind words and glad to see you again. I still use Fireworks also. My 4 year old son recorded a video tutorial the other day using it, he drew the shape of Mickey Mouse haha. I'll include his 40 second tutorial maybe in one of my upcoming videos. I wish they would give Fireworks to the public open source, I would maintain it with the community and make it popular again. It's the best tool for slapping together web graphics quickly and intuitively. Adobe dropped the ball on all 3 Macromedia tools they acquired.

  • @aashish1823
    @aashish1823 4 года назад +2

    Thanks for the video, welcome again.

  • @lcscrts
    @lcscrts 3 года назад

    Your teaching is very good, you should continue

  • @testovictestovic8606
    @testovictestovic8606 4 года назад +2

    Thank you so much Adam 👏😃

  • @MRMOTOFOTO
    @MRMOTOFOTO 4 года назад

    How did I not see this? The OG has been sorely missed.

  • @s2003katalin
    @s2003katalin 4 года назад

    So happy to see you back!!

  • @ChrisBrown1957
    @ChrisBrown1957 4 года назад

    As a developer myself ... I must say this is a FANTASTIC video, explained step by step in a way I think even a 'newbie' could follow. (Have you ever thought of amalgating all your knowledge into a saleable video course?) OK, so I know this is aimed at (pardon the term) learners, but one thing the code would need in terms of uploading videos is the method to 'chunk' large files (I've Googled that part of the code). I also found your _(id) function an eye opener. So far, my scripts are littered with DOZENS of var x=document.getElementById('xxx'),value; so that function will definately help. (Next step is to play/pause the video so I can make a note of the code!)

  • @AnwarHashmi7
    @AnwarHashmi7 4 года назад

    Welcome 😊
    Thank you for teaching PHP development I have learnt from you

  • @rockministry7990
    @rockministry7990 4 года назад +3

    God, the Creator of all that exist, had in mind to give birth to Adam Khoury in whom He instilled wisdom, patience, eloquence, fluency and, above all, a loving and devoted heart willing to alleviate and amplify the coding ability of all those who are and use to struggle in front of their computer screen whenever they face the php, css, html and javascript environments. Adam Khoury you have greatly contributed to the progress of my web development skills. I am grateful for all the time and passion you put into every single video. May you and your famility continue to encounter joy, health, prosperity and success.

  • @chessjames
    @chessjames 2 года назад

    2:40 I was literally thinking this right before you said it :D

  • @ted9097
    @ted9097 4 года назад

    Yo man, excited for this comeback.

  • @RA__23
    @RA__23 4 года назад +2

    Thanks very useful

  • @Mauricode-Academy
    @Mauricode-Academy 4 года назад

    You are the best !welcome back

  • @suleimanmamman7689
    @suleimanmamman7689 4 года назад

    The best is back. Awesome

  • @TechnicalDhruva
    @TechnicalDhruva 4 года назад

    Best turorials with latest

  • @YouHolli
    @YouHolli 4 года назад +2

    Welcome back =)

  • @ourielperez1646
    @ourielperez1646 4 года назад

    Thank you for your videos ! :)

  • @devwithbrian1534
    @devwithbrian1534 Год назад

    Great content. Thanks

  • @emojiliokipi
    @emojiliokipi 4 года назад

    Welcome back Adam.

  • @akashvarde6885
    @akashvarde6885 4 года назад

    Yeah !! adam is back ! and i am mouth marketing to sub to ur channel !

  • @dunste123
    @dunste123 4 года назад +1

    note for the users using a button instead of an input: make sure to have type="button" or your form will submit itself as if it was a submit button

  • @souviknag
    @souviknag 3 года назад

    The boss is back!!

  • @theApeShow
    @theApeShow 4 года назад

    This is a godsend.

  • @roypriyanshu02
    @roypriyanshu02 4 года назад

    You are awesome 👍😁👍

  • @markwaters5964
    @markwaters5964 4 года назад +1

    Welcome back!

  • @RodrigoMendoza7
    @RodrigoMendoza7 4 года назад

    This tutorial comes in handy to me, so useful I could learn one thing or two. Thank you, sir! I wonder if you could make another version of this tutorial by using the fetch API.

  • @wiseguy6930
    @wiseguy6930 4 года назад +1

    Wooo!!

  • @gtbmcollins1
    @gtbmcollins1 2 года назад

    Adam, this code worked perfectly, thank you. I need to give it some style though and make it mobile friendly. Can you add css code right in the html file or do you need to have it directly in a css file?

  • @treenopie
    @treenopie 4 года назад +1

    function _(id)... so cool!

  • @syedijlalhaider3657
    @syedijlalhaider3657 4 года назад

    Welcome man

  • @yakut54
    @yakut54 4 года назад

    Новый контент подвезли ))

  • @jsfaulds
    @jsfaulds 4 года назад +18

    Where have you been man????????????? do you know the Beatles have split up :):):):):):):):) and Donald trump is president

    • @danielromeo99
      @danielromeo99 4 года назад +2

      J F hahaha duude. I’m also in shock. Great to have him back

    • @alexrusin
      @alexrusin 4 года назад

      And do you know they don't use closing ?> tag in files containing only PHP anymore 😉

    • @breebw
      @breebw 4 года назад +2

      @@alexrusin The burnt people at the stake in the 1500's for such progressive talk.

    • @alexrusin
      @alexrusin 4 года назад

      @@breebw You make me feel like Giordano Bruno: "PSR-2 does not change because it is, or it is not, believed by a majority of people" 😅

  • @jameswalker231
    @jameswalker231 4 года назад

    omfg.... a new video....
    yaaay

  • @kevinwiens4804
    @kevinwiens4804 2 года назад

    Please do a more in depth series ,
    teaching about JSON..

  • @General_Aladeen
    @General_Aladeen 4 года назад

    hope you teach creating API in PHP or NodeJS

  • @TimBoon
    @TimBoon 4 года назад

    Works perfectly on the PC. Phones don't like it! Often freezes during the upload, any ideas?

  • @ademineshat
    @ademineshat 4 года назад

    Great start 😁 Thank you legend 😍
    P.S. Maybe it's a good idea to have the whole screen, so we can easier follow along, with zooming its like old fashion. At least for me!
    It's just my preference :)

    • @AdamKhoury
      @AdamKhoury  4 года назад +2

      Many would say that they can't see the tiny text and many would make syntax mistakes. There would be no way to see the entire application on a screen anyway unless the text appeared as 7px.

    • @ademineshat
      @ademineshat 4 года назад

      @@AdamKhoury you right, but I've been used to that lately where the online courses or RUclips Tutorials increase the font :) anyway keep going. Thank you again, I'm really a big fan of you:)

    • @AdamKhoury
      @AdamKhoury  4 года назад +1

      @@ademineshat I'm not mad, just giving my feedback on the suggestion. I am sad that you have become used to straining your eyes or not being able to distinguish a colon from a semicolon. It helps for the syntax to be shown as big as possible. In the beginning of my video you can see the whole screen, just pause there and code before I make it clear to everyone else.

    • @ademineshat
      @ademineshat 4 года назад

      @@AdamKhoury I understand Adam! It's ok

    • @AdamKhoury
      @AdamKhoury  4 года назад +1

      @@ademineshat Thanks for the feedback. Talk soon.

  • @dastgirakhtar9782
    @dastgirakhtar9782 4 года назад

    Welcome

  • @charbelsarkis3567
    @charbelsarkis3567 4 года назад +1

    how about dynamically adding a file input tag every time the user adds a file.

    • @General_Aladeen
      @General_Aladeen 4 года назад

      just use createElement and append the input

  • @MyStudio-io3so
    @MyStudio-io3so 3 года назад

    Hi Adam I have tried thsi to call my php script but it did not work. Now, the php script works very well but i wanted to add the ajax to prevent the page going back to the top after an upload as this will make a horrible user experience. Not sure if i am missing something here. Your the only guy on the topic of JS i feel confident about learing from. Everything seems to be ok with the JS and PHP but for some reason it is not passing the data to the php isset function

  • @censura1210
    @censura1210 2 года назад

    Do you have a link to the code though? That would be very useful so that we could copy the code and then tinker with it and make it exactly for our particular use-case.
    I was looking for a vanilla-js ajax multi-file upload solution witht progress-bar and I don't wanna use the Boostrap File Input plugin and jQuery because I wanna make my page lightweight and both of them are huge.

  • @nkamsartist6678
    @nkamsartist6678 4 года назад +1

    Hey Adam! I hope that you are okay. Can you make a file preview upload like in gmail and submit it all with one send button? Thank you!

  • @DavidBrooksNYC
    @DavidBrooksNYC 4 года назад +1

    brooklyn says hello

  • @IanSebryk
    @IanSebryk 4 года назад

    why `var` instead of `let` within your functions? habit? just curious, i know it has no performance/functionality impact.

  • @salmonsum
    @salmonsum 4 года назад

    Nice video.can you please make videos on webRTC and media source extension api!!

  • @Programming-Fun-With-Hima
    @Programming-Fun-With-Hima 4 года назад

    Thank you, can you do one with axios and node.js

    • @AdamKhoury
      @AdamKhoury  4 года назад +1

      No problem sir. Unfortunately I probably won't do it using that combination of technologies.

    • @Programming-Fun-With-Hima
      @Programming-Fun-With-Hima 4 года назад

      @@AdamKhoury Ok, thank you.. That was appreciated

  • @farzadkhoshnood
    @farzadkhoshnood 3 года назад

    Hello. Excellent where to download the code of this project

  • @amedandujar6670
    @amedandujar6670 4 года назад

    Hi Adam how can i limit number of uploads. 7 imgaes for example with js and php and display them in slideshow tks

    • @AdamKhoury
      @AdamKhoury  4 года назад +1

      Hi Amed. Directly after you access the array of files in your JavaScript:
      if ( userfiles.length > 7 ) {
      // Do something here to tell them too many
      return false; // stops the uploadFiles() function from running further
      }

  • @MrBabaagba
    @MrBabaagba 4 года назад +1

    Adam you are not keeping your promise of keeping this channel active with constant upload

  • @sidhharthgupta5772
    @sidhharthgupta5772 4 года назад +1

    Sir, How you know I am making something like this and need this codes... I think you are a great magician.

  • @onosekewenu
    @onosekewenu 4 года назад

    Hey Adam, PHP is throwing a 403 error message if file name contains an apostrophe (i.e. o'brien.jpg). Tried server-side renaming or str_replace("'", '', $_FILES['file']['name']) to no avail. Manually deleting the apostrophe prior to upload resolves the issue but can't force users to do that (bad UX). Any tips or suggestions?

    • @AdamKhoury
      @AdamKhoury  4 года назад

      Does it happen before the file processes through your move_uploaded_file() function or during/after?

    • @onosekewenu
      @onosekewenu 4 года назад

      @@AdamKhoury It happens before the move_uploaded_file() line. Actually, it happens even if you comment out every line of code in php.

    • @AdamKhoury
      @AdamKhoury  4 года назад

      @@onosekewenu Let me recreate the issue and experiment on my server. I'll get back to you.

    • @AdamKhoury
      @AdamKhoury  4 года назад

      @@onosekewenu Okay I just renamed one of my images to o'brien.jpg. Loaded up the files from this video tutorial onto my server and the upload worked. It was file # 2 of 3. So all I can assume is that it's a setting specific to your server configuration. Maybe mod_security or something. Maybe try this on the very first line of your PHP file before anything else:
      header('Content-Type: text/plain; charset=utf-8');
      To attempt a character conversion before the script grabs $_FILES object. I honestly have no idea how to recreate the issue you are seeing. If all else fails contact your host and ask if there are any security settings for the server that can convert single quotes to another encoding, to allow the files to go through. If you figure it out, let me know what the setting or fix was.

    • @onosekewenu
      @onosekewenu 4 года назад

      @@AdamKhoury Thanks Adam. Already tried setting the header to no avail so yeah I think its specific to my shared hosting server config or mod_security settings. Anyhow, I've figured out a front-end fix with JS by adding if (userfiles[i].files[0].name.includes("'")) { var file = userfiles[i].files[0].name.replace("'", "") }; before calling formdata.append inside the for loop.

  • @rajabhishek4973
    @rajabhishek4973 4 года назад +1

    Awosem

  • @sonleq987
    @sonleq987 4 года назад

    Adam man, can you give us the code for the project you did for a client.

  • @Kodeispoetry
    @Kodeispoetry 4 года назад

    Sir, Thank you for providing the great work. Would have been great if you would have shared the source code.

  • @himalshaha3968
    @himalshaha3968 4 года назад

    Can u give us sql query link

  • @jarodmorris611
    @jarodmorris611 3 года назад

    3 dislikes???? 3 people found this video after they were already done.

  • @umut58tr
    @umut58tr Год назад

    Hello,
    I would be grateful if anyone can share the codes of this nice tutorial where I can download it.
    Merhabalar,
    Bu güzel eğitimin kodlarını indirebileceğim bir şekilde paylaşılan bir birisi varsa minnettar olurum.

  • @rajabhishek4973
    @rajabhishek4973 4 года назад

    Plese make a php appointment system in php

  • @jsfaulds
    @jsfaulds 4 года назад

    HTML is like cooking on a log fire man with a pig on a stick

  • @massimoboaron8714
    @massimoboaron8714 3 года назад

    Very nice, very clear and very important for me ... but it doesn't work! I can demonstrate 1 error , but I cannot find others, so I've already spent 2 days looking a bar that moves, and 1 file that is uploaded after elimintìating the ISSET that should not be eliminated. No way to load multiple files until now !!! Dear Adam, the phylosophy of "just video" is a good phylosophy if you lessons would be 100% OK, but to find out my writing errors and your software errors requires too much wasted time. And at the end I have to start from beginning looking for other solutions. I'm not happy !

  • @lakhveersingh1065
    @lakhveersingh1065 4 года назад

    Just came here to see, if you still use adobe Dreamweaver for coding :)