How To Create A Password Protected File Sharing Site With Node.js, MongoDB, and Express

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

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

  • @JJTrades_X
    @JJTrades_X 2 года назад +26

    It's impressive how you can communicate and flow through that entire tutorial without any "umms" or choppy mental glitches. Very sharp!

  • @Deccoyi
    @Deccoyi 2 года назад +69

    I'd like to see more simple project like this. Especially React + Express combinations :)

    • @samareshdas767
      @samareshdas767 2 года назад +1

      You stole my comment. Lol. That'd be really helpful

    • @social_hub4703
      @social_hub4703 2 года назад +2

      Svelte aswell! Not much full stack content out there with sveltw

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

      You should learn nextjs

    • @reydez84
      @reydez84 2 года назад +1

      yeah same, would be nice!

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

      I agree, this video is to project specific. No use into explaining only one road to the solution.
      I find the videos about "new things in javascript" or "how to write better/cleaner code" way more interesting and helpful in general.

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

    Quick tip:
    If you write *npm i -D * it is just to install dev dependencies.

  • @maverick7291
    @maverick7291 2 года назад +12

    Is there a file size limit?

  • @berk473
    @berk473 2 года назад +1

    Your tutorials are the most efficient and helpfull ones!! Thank you

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

    Best demosntration of concepts

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

    One of the best tutorial that I have ever watched! Thank you very much

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

    As you said this is perfect... I was making a file sharing project... And now I have graduated... 😁😆

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

    Thanks for this!

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

    maaan i was just yesterday working on your 2019 video about jwt im so happy you had this video happen as well

  • @luce9574
    @luce9574 11 месяцев назад +1

    Thank you (Web Dev Simplified) this helped me a lot

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

    I saw this a week ago in our gh repo. Nice video

  • @mdhossen7082
    @mdhossen7082 2 года назад +1

    Wow Amazing and very helpful video,
    Thanks web dev simplify,

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

    Not surprised, you are so good as always!

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

    Very simple project,
    I like it,
    Please keep going with this method,
    Thank you very much.

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

    Amazing as always

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

    I love your coding concept

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

    Thanks Kyle! Fully explained, super nice project.

  • @bryson2662
    @bryson2662 2 года назад +1

    yes! more backend stuff.

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

    Great tutorial. Thanks so much.

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

    Your project is amazing, I love it ♥️♥️♥️

  • @RafaelPerches
    @RafaelPerches 2 года назад +1

    Dude, like every video of yours, this is awesome. But hey, what's the rush? Jeeeeeeeeeeeeeeesus....You speed so much it's like you're on 1.5x

  • @tusharrai9762
    @tusharrai9762 2 года назад +3

    create a file compression app using this one, it would be good content

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

    Amazing as always, 😊😊

  • @samadityajatar3539
    @samadityajatar3539 2 года назад +3

    If you encounter a mongoose uri error add these lines to your code const dotenv = require('dotenv');
    dotenv.config({path : "./views/config.env"})

  • @marvelBoy1909
    @marvelBoy1909 2 года назад +2

    Can you please make a video to connect this to hosted mongodb database and create a shareable link to anyone instead of localhost 🙏

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

    Thank you from syria❤

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

    As cool as always, thanks for simplifying the web 😁😊😊

  • @panoscool_
    @panoscool_ 2 года назад +1

    Kyle, why you didn't use imports instead of require? What version of nodejs you're using?

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

    Keep going broo👍👍👍

  • @happynewyearw
    @happynewyearw 2 года назад +10

    Great video as always! But it will be even better if we could start seeing ES6 modules import/export syntax instead of the old require (maybe just mention it only when necessary). so the whole community can learn and move on with modern syntax.

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

      Even though i think commonjs has good abilities like overriding require and using exports inside functions. import/export just feel like something new ( is which I appreciate too )

  • @t.rinity.
    @t.rinity. 2 года назад

    I really wanna know how to secure the mern stack. That'd be amazing. I love all your videos about pieces of the mern stack you've been doing they're so helpful👍❤🤗 thank you Kyle!

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

    Really really like you toturial

  • @mihailodrinic4003
    @mihailodrinic4003 2 года назад +1

    Can you create a tutorial where you use the mern stack?

  • @ronakmehta8106
    @ronakmehta8106 2 года назад +2

    is there a reason to use ejs instead of react or normal html in the application ?

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

      I think is just simplicity for the tutorial sake

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

      In ejs you can render html with data inside. Just a template lang like pug, hbs, etc..
      React is more like express - it is mostly used for routing and rendering

    • @MYNAMEISKLAY
      @MYNAMEISKLAY 2 года назад +1

      I think this tutorial was for those who are learning JS who also desire to learn backend dev quickly. Him doing this in React or another framework would've required him to actively teach those viewers how to use said framework.

  • @Chris-qg6kc
    @Chris-qg6kc 2 года назад

    That Kyle guy...he’s pretty good. He just might make it to 1 mil subscribers one day....🧐

  • @Elduque40
    @Elduque40 2 года назад +1

    Awesome!!!
    Maybe dockerising everything would be even better so people don’t have to install mongodb and what not locally

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

      That sounds complex for a beginner following the tutorial

  • @sambathravi6580
    @sambathravi6580 2 года назад +2

    Pls make video table add,delete selectable,sortable, column draggable using js

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

    I have a question. What library is used for the public folder. You created a views folder since you using ejs.

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

    very interesting, thanks!

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

    Can you tell me about other windows also shrink when you resizing one window in this tutorial?

  • @ryan_roga
    @ryan_roga 2 года назад +2

    I notice you use `npm i` over `npm install`. Did you know you can use `-D` instead of `--save-dev`? `npm i -D nodemon` will save you a few keystrokes ;)

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

    God! I’m loving this

  • @MG-nn8dy
    @MG-nn8dy 2 года назад

    Gah! Deployed to Heroku with an 'ephemeral server,' the dyno will cycle and flush the 'uploads' folder regularly. Was trying to migrate from mysql2 to mongo to store the images in the DB instead of the image path... looks like S3 buckets is almost a must.. gah

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

    Hey, dev I'm following your videos, and all are so amazing that I can't describe them in words. Just wanna say thank you so much and one last need your help can make an e-commerce website with frontend and backend in (mern) that will be good for us to )).

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

    how is this shortcut works in 6:43

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

    You should definitely do a more in depth tutorial on multer and how to work with files in large applications

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

    is it possible to host this project in heroku , I mean does herouku allows for file upload and download ???

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

    That was so awesome! Thank you so much. Could you make more videos on MERN stack, maybe on GraphQL as well, please?

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

    More backend engineering videos please

  • @Bandit01
    @Bandit01 2 года назад +2

    can you please make a video on giving better names to your classes,id,variables etc........

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

      Should probably be a short about that, but it's quite simple:
      Make it as descriptive as possible, so that somebody who's ever seen the code before knows exactly what that symbol does.

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

    At 22:17 when mentioning the file id, isn't it supposed to be file._id and not simply file.id? Do both of those work regardless?

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

      The "file" constant here is a Mongoose Document, whose API provides an "id" property, which is a string representation of the regular mongodb ObjectId identifier _id.

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

      @@mykalimba Oh I see, that makes sense. Thanks for replying!

  • @srinivasjoshi4693
    @srinivasjoshi4693 2 года назад +1

    Please teach us how to host this also 😃

  • @a.k.3531
    @a.k.3531 2 года назад

    Great tutorial! Learnt so many thing so quickly. However, I have some issues. I am at File upload server logic section, and when I click share btn it says _message: 'File validation failed'. Do you have any ideas what's that all about?

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

    First thank u very very mach for this lessons, second can u learn us about build simple audio book , all love❤

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

    can we use react instead of ejs?

  • @breenud39tv
    @breenud39tv 2 года назад +1

    What would you recommend to use better SQL, or mongodb?

    • @weshuiz1325
      @weshuiz1325 2 года назад +2

      There is no better, only what is the right tool fir the right job

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

      @@weshuiz1325 I want it for more of a social media up

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

      Then SQL

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

    Thanks for this video sir, please can you make a video on how to auto delete documents in mongodb. Just like in WhatsApp status, using mongodb and express.

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

    If someone cancels the download, the download count should not increment, correct?

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

    If this is deployed, will it work?
    since we have locals.fileLink in the ejs files

  • @LeadEngineer
    @LeadEngineer 2 года назад +2

    Problem is that the friend won't have access to the localhost if you don't port it

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

      That is the problem with every type of server

    • @LeadEngineer
      @LeadEngineer 2 года назад +2

      ​@@samuelhulme8347 You're right 100%. But I don't know why he started with , "You can send this to a friend". You can if you do a little bit more work that I haven't seen in the clip. Or did I miss something?

    • @callmejd9665
      @callmejd9665 2 года назад +2

      @@LeadEngineer The project as seen in the video is run in a local development environment, as explained in the setup portion of the video. When you run the project in a production environment, you would run it on a dedicated server with a constant IP-address/domain and optionally adjust the environment variables. In that case, the link would then be accessible by other people.
      But you are correct in that it wasn't explicitely shown in the video how to do that.

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

    I am getting an error for File.create it says cannot read properties of undefined (reading 'create' )

  • @chaitanyagatreddi2670
    @chaitanyagatreddi2670 9 месяцев назад

    can we do it using mysql?

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

    Can you make a video on customer support chat please

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

    How would you handle giving users the ability to download multiple files into one folder then into their machine

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

    How would I do this with sqLite instead of MongoDB

  • @ren5124
    @ren5124 4 месяца назад

    Does it work for any files?

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

    Anyone can explain the why of the 2 methods get and post "file:id" please. I dont understand the thing about the form with the get and post :c

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

    can we deploy this application on web somehow ?

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

    why my download dialog box does not appear when i click on the download option

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

    technically if we pass the url "/uploads/fillename" we should be able to retrieve it right?

    • @mykalimba
      @mykalimba 2 года назад +1

      No, because neither the uploads folder nor anything within it are exposed as endpoints in the express router.

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

      @@mykalimba ah shit man how did I miss such a silly thing.........

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

    Is it work with multiple file upload and accessing one among it?

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

      Yes.
      With multer you can can multiple uploads or just get a single file from multiple uploads.

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

      @@sneak9407 But previously uploaded is replaced by current uploaded file.

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

      can we show all uploaded in list or in table format?

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

    Anyone know how to deploy this? I think the EJS makes it not a simple drag-drop into Netlify.

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

    What about using FastAPI?

  • @user-eg4nz8zu4r
    @user-eg4nz8zu4r 2 года назад

    How do I avoid entire app crashing when I visit a file path that does not exist?

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

    Bra please complete this project 🔥😩..... I'm failing to redirect pages, I want the link to be on it own page

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

    With this, you're just one CDK Basics tutorial away from making modern, serverless, service-based cloud applications.

  • @ninjacodertech
    @ninjacodertech 2 года назад +2

    instead of doing something like if (file.password != null) just do if (file.password)

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

    Love

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

    This Project could be made with nextjs very well

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

    Kyle, Kyle. (sigh) Thanks a bunch.

  • @IyanSR
    @IyanSR 2 года назад +1

    Hi Kyle, thanks for the content, always!
    If you dont mind, can you share how to create web3 wallet like metamask? Thank you

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

    File.create Is giving me error, Can anyOne help??

  • @akam9919
    @akam9919 2 года назад +1

    First

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

    I'd honestly just use something like PouchDB and have the database tirhgtly integrated into the app...

  • @patrickgrady8213
    @patrickgrady8213 2 года назад +1

    I love your videos. I subscribe and like. I hate that you don't use semicolons. Is there a reason you don't. Js is a c like language which means semicolons are necessary. Just because you don't actually use them, the browser puts them in for you. There are many bugs that can come from this and it is very hard to find them

    • @M9625Rahul
      @M9625Rahul 2 года назад +1

      Semi colons are optional
      Also that is prettier extension which adds the semicolon

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

      there will be no bugs if you know what you're doing

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

      @@RedStone576 if I knew what I was doing why would I be watching this video. Thanks for your help

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

      But just to be sure. Semicolons are NOT optional in the JavaScript virtual machine inside the browser. I'm guessing v8. You are wrong v8 puts them in for you because you are lazy.

    • @RedStone576
      @RedStone576 2 года назад +2

      @@patrickgrady8213 its not only v8, every implementation of ecmascript have this set rules for automatic semicolon insertion.
      also its not because that people are lazy, but the asi rules is already pretty well thought that many people is confident that their code will not break.
      well yes semicolon is necessary in most C like languages but that because back then line terminator is needed so they can simplify the compiler, unlike when js was developed; it's goal was to be an accessible scripting language that everyone can easily learn.
      hell even some modern languages coding convention recommends you to *not* use semicolon whenever its possible, it's just up to you if you wanna use it or not :-)

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

    🙂❤️

  • @kathithsahu1804
    @kathithsahu1804 2 года назад +1

    Second

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

    20.24

  • @jaromanda
    @jaromanda 2 месяца назад

    FYI: Your code has been copied so many times, without the attribution your licence requires

  • @CrAzZyKiLleR01
    @CrAzZyKiLleR01 2 года назад +1

    I find it so disappointing that you absolutely do not respond to questions or hints/comments from the community
    But yeah, nearly 1 Mio. Subs prove you right

    • @WebDevSimplified
      @WebDevSimplified  2 года назад +1

      I do respond to some comments but I get hundreds a day. I cannot keep up with and respond to them all. I try to read a lot of them though.

  • @r4rama
    @r4rama 2 года назад +1

    third

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

    php is mum

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

    0x0

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

    Thank you for slowing the video. I didn't have to do it by myself❤💚🤎🤣