Uploading Files to MongoDB With GridFS (Node.js App)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] coding dojo is a programming school that turns beginners into developers in only 14 weeks over 90% of their grads land jobs within three months of graduating often making over seventy K per year to learn more visit coding dojo com or click the link in the description below hey what's going on guys so I've had quite a few requests in the past few months from people asking me to create a video on how to upload files or images to MongoDB and I and I don't mean upload them to the file system and then just record the the file name in the database but upload the actual file to the database so that's what we're going to be doing we're gonna build an application that allows us to do that now if you know quite a bit about MongoDB then you know that there's a restriction there's a size limit on documents okay be some documents Beeson is just the the basically the data types or data standard that MongoDB uses it's very similar to Jason it just has some additional data types and so on but to get over this for files you need to use something called grid FS and it says right here it's a specification for storing and retrieving files that exceed that limit so that's what we're gonna do to handle the uploading we're gonna use Malta and I've done quite a few videos that used Malta it's used for uploading files and there's different storage engines you can use for instances in Amazon s3 engine if you wanted to use it with that if you wanted local file uploads or cloud inari there's a lot of different basically modules that you can use in grid FS is one of them so this multi grid FS storage so we will be using this and this will handle the basic uploads and then we'll also be using this grid FS stream which allows us to easily stream files to and from MongoDB so this is what we'll use to do things like display images that we upload as well as delete files from the database so we're gonna basically implement both of these modules okay as far as the database I'm using em lab what is a remote MongoDB database if you want to use a local instance that's absolutely fine the only difference is the the connection string okay so this is our connect well my connection strength for this database you can of course use a local one as well all right what else I think I think that's it so let's go ahead and let me just give you a demo real quick so if I click browse and by the way we're using ejs for our template engine here in bootstrap for our UI framework so if I just upload like let's say this thumbnail for one of my recent videos and click Submit you'll see that that'll go ahead and upload if I were to upload let's say this script dot text file and submit it'll just basically just give us the file name and it's not the original file name you want to make sure you change that because you don't want people uploading the files with the same name so we're gonna use the crypto module which is a core node.js module to kind of create these these unique file names all right now if I go to my database and I reload the collections you'll see there's now an uploads dot files and an uploads dot chunks now uploads dot chunks is basically makes it able for us to to upload larger files and there's nothing in here that we're really gonna need you can see binary data there's nothing in here we're really going to need for our application what we're interested in is the files the file info itself which you can see we have the file name the Janet will is generated file name the type this is the image this one you can see is the text the date the chunk size the length all that stuff the ID so each one has its own unique ID so you can see that those were uploaded and I can also delete so if I go ahead and delete this one you can see it's gone and if I reload my database it's gone as well so I'm gonna show you how to build this little application and obviously the application itself is nothing special it's nothing you would deploy but it's gonna it's gonna give you insight on how to do this so that you can do this in your projects and its really good for platforms where you may not be able to who access the file system and upload them directly so you could upload them to your database all right so that's what would be building hopefully you enjoy it and let's go ahead and get started all right so the very first thing you want to do is make sure you actually have a MongoDB instance to to work with and you can install MongoDB locally and use that that's absolutely fine or you can do it I'm doing and use M lab which is a remote deployment okay so it's it's free to sign up it's free to use the sandbox account so what you need to do is just sign up and then log in and you'll see a screen like this I already have two databases here you won't see these if you just signed up but you just want to click on create new and you can choose your cloud provider we're going to choose the free Amazon Web Services sandbox and we're gonna choose we're just gonna click continue and then I'm gonna choose US East for my location and continue and then give it a name so I'm just gonna call this uploads and then click continue and it's just gonna give us kind of a summary and we'll click Submit and that should set up everything and once this turns into a green check it should be ok and we'll click on it and then the last thing we need to do is just create a user ok I don't mean your mont your M lab account user I mean a user for the database so you want to click on this tab and then just click add database user I'm sure a lot of you guys have used this before I'm just gonna use Brad for my username and the password for this database all right so now that should be all set we don't have any collections that's absolutely fine those will get created as we build our application alright so now that that's set up we're gonna come over to vs code and I just have a completely empty folder called uploads and this is where we're going to create the application so first thing we'll do is run NPM in it and create our package JSON file I'm gonna go through this here description I'm just gonna say simple app to upload files to MongoDB and I'm gonna use app dot J s is my entry point and then just go through the rest all right so now we have our package JSON file now there's quite a few dependencies we're going to be using so I figured would just get it all out of the way and install them all so let's do NPM IR install and we want to Express we want EJ s is our template engine we want body parser for the form we want what else Mongoose to connect to our database mult are for the uploads we also need the multigrid FS so it's it's actually mult are - grid FS - storage yeah and then we also want the grid FS stream we also want a module called method override and the reason for that is because I want to be able to make a delete request without making an AJAX call I want to be able to do it through a form and this this module allows us it allows us to do that alright so I think that should be it for our regular dependencies so let's go ahead and run that and those should all get added to our package.json file good and then there's one more that I want to add as a dev dependency and that's node Mon so that we don't have to keep restarting our server and it'll just constantly watch so we want to do - - save - dev and node Mon all right and we're gonna just add a couple scripts in a minute here once this is done all right so that's added as a dev dependency so let's go up to scripts and let's get rid of the test we're not gonna use that and let's add a start script and basically this is just going to be to start it regularly so we'll say node app dot J s and let's also add a dev script that uses node Mon and that's what we'll be using so it'll be node Mon app dot J s all right so we'll save that and that should be it for our package jason so next thing to do is create our app dot j s file and this is pretty much where we'll be doing everything except the view we're gonna have one index view which will be that page you saw with the form so before we get into like the the and the grid FS I just want to create a basic Express server that runs with a view so let's let's um let's bring in Express so we want to say require Express let's also that's fine for now we'll do that and then we'll just initialize our app variable with Express alright and then let's let's set our view engine so we're gonna say app dot set and we want to set the view engine ejs is one of the easiest or the easiest view engine to set up and by the way if you wanted to use react or something on the front end and use this as a multi and all this stuff you can still do that I'm just using ejs cuz it's quick and this isn't a front end video this isn't a react video next thing we'll do here is let's let's create our route so we'll say app get and it's just gonna be the slash so the index route and we'll use an arrow function here and we'll include our requests and response and we're going to res dot render a view and we want to render the index view okay which will be the only one we have and then let's put our port into a variable we'll do five thousand and then what we'll do is say app dot listen-listen on that port and then we can put in a callback or an arrow function in this case and let's just console dot log and I'm gonna put some back ticks in here and I'll say server started on port we use our template literal very eye expression syntax and we'll just put in the port number alright so we'll save that and then we'll create a folder called views now automatically ejs is gonna know that it's gonna look for this index view inside of this folder so let's create a file called index dot ejs and in here we'll use Emmet to put in some head body tags and let's see we'll go ahead and change the title to long go file uploads and let's just put an h1 in here for now and we'll say file uploads alright so we should be able to start the server let's go ahead and run npm run dev and that should start up node lon alright so server started on five thousand let's check it out and there we go so it's loading up our view alright so next thing I'm gonna do is is just finish up the view so we're gonna use bootstrap so I'm gonna go to get bootstrap comm get started and let's grab the CSS CDN here put that in the head and then we'll grab the three script tags and we'll put that right above the ending body tag alright so we'll save that and you'll see the font will change and then what I want to do is is just add I want to use a little bit of the grid system here so let's see under the in the body tag we're gonna put a container first and then a row and then we're gonna do a six column div so call MD six but I also want to add another class here because I want to push it to the middle so it's gonna be M - Auto four margin Auto and then we can take this h1 right here and we can move that up and let's add a couple classes on here such as Tech Center I also want to do display - four and then my - 4 which is just margin on the top and bottom the y-axis alright so if I save that and reload it should look like that make that a little smaller and then underneath the h1 is where our form will go so let's put in a form here and let's give it an action of slash upload okay it's gonna also be a post request so we'll give it a method of post and then let's also give it an Inc type because if you need if you're gonna use a file field then you need to do ank type equals multi-part form data okay I'm sure you guys know that all right and then inside here we're gonna use a little bit of bootstrap and we're gonna have a class of custom - file I'm also gonna do a class of MB - 3 which is just margin-bottom and then the input will go in here this will be type file the name I'm gonna call file the ID I'll call file and I'm also gonna give it a class of custom - file - input all right and then under that we'll have a label whoops love a label for file and let's see they're also gonna have a class of custom - file label and in here we'll just say choose file alright and then finally under this div we just want to put our submit so we'll say input' type submit' value submit and then we'll give it a couple button classes do BTN block make it stretch all the way across and that's it so let's save and reload and there we go so that looks pretty good alright and I know that I don't have to do this stuff it would be a quicker tutorial without it but I like to make things neat and just you know make it something worth something so I don't know hopefully you guys can appreciate that even though it makes it a little longer alright so we have our basic view now what I want to do is start to implement the MongoDB stuff so we're gonna bring in a couple things up here let's bring in the path module which is just a core nodejs module so path I'm also gonna bring in crypto which we're gonna use later on to generate the file names and that's also an accord nodejs module let's bring in Mongoose sure a lot of you guys have used Mongoose it's basically an ORM to interact with MongoDB and we're not used we're not going to create any models or anything we're actually using the grid grid FS stream to do basically like the crud app operations all right so let's also bring in multi we want to bring in let's see let's bring in the multi grit FS so I'm going to call this grid grid FS storage and set it to multi - grid FS - storage all right and then we also want to bring in the grid FS Stream and we're gonna just call this grid all right let's see what else one more thing we want to bring in method override so lower case method override all right so the that's everything that we need to bring in I believe now what we're gonna do is just add a couple of things of middleware so body all body parser I didn't bring that in alright so let's see middleware we're gonna say app dot use and we want body parser dot jason that's a function and then we have one more piece of middleware from method override so we're gonna say app dot use method override and we just want to pass into this um a string of underscore method and that's just basically telling us telling it that we want to use a query string when we create our form in order to make a delete request alright so now that that's done let's create a URI form our MongoDB install not installation but instance so say URI equals and then we're gonna go ahead and grab this string here of course if it's all if it's if you're using local MongoDB it'll be like MongoDB / / localhost whatever whatever you want to call your database but if you're using M lab you want to paste that in and you want to just replace the user and pass and I just used Brad for both okay so now that we have that let me see I'm just going to close this up make this a little bigger now we're going to create our connection so to do that we'll say Const we'll call this con set it to Mongoose dot create connection and then this takes in the URI like that all right now I just want to initialize a variable for the stream for the grid FS stream so it's gonna be called GF s so I'll say let GF s just to initialize it and then what we need to do is we need to actually show you it's in the documentation for grid FS Stream I believe it gives you a bunch of examples if you're using the standard MongoDB driver but we're not we're using Mongoose so if we go down to the bottom it says using with Mongoose we basically want to take our connection variable which we already created and called dot once and then pass in open so basically when our database is open when it when it's loaded we want to set that gfs variable to grid which as you can see up here is our grid FS stream all right we want to pass these things in so I'm just gonna grab that I guess I'll just copy it and we'll paste that in alright and let's just change up some things here I don't want to use var actually I want to use anything because I already initialized it right here so we don't want we don't want to declare it again and then I also don't want to use a callback I want to use an arrow function just preference and then what we want to do is take the gfs and we want to do dot collection and we want to specify what we want to use for a collection name and I'm gonna use uploads remember we saw uploads dot chunks and uploads dot files in our database this is what determines that all right so now that we did that let's see so basically initialize our stream now what we want to do is create our storage engine or storage object and we can look at the documentation for multi grit FS storage and if we go down here there's some basic setup here but it's not really what we want we want more freedom to be able to create our filename with the extension so if we go all the way down to this right here see how they're creating a storage variable and they're using crypto to basically generate that long string and then they're passing on the extension name so they actually have something dot jpg or whatever as the file name so that's what we're gonna do we're gonna grab this block of code and we're going to paste that in here we're gonna refactor it a little bit for one thing they let's see they may they didn't they have an error here they they add an extra parenthesis so right here see who where this red line is that's that actually shouldn't be there so we're gonna delete that another thing I'm gonna do is I'm gonna use Const right here instead of var and then we're going to also change the URL right here to our own remember we have that variable of you are I so will pass out in and then that should be all we need to do here and what it's doing is it's it's returning a promise and we're using crypto dot random bytes okay there's a method with this module called random bytes and you can see right here it's used to generate names and it's going to generate that that long string okay I think it's 16 characters I think that's what that is I haven't used this crypto too much if there's an error we're going to use the promise rejecter and just throw the error if not then we're gonna create the filename with the extension we're gonna have an object called file info with the file name along with the bucket name the bucket name should match the collection name and then we're going to resolve the promise with that file info okay and then we're gonna just create a variable called uploads set it to melt our and pass in the storage engine okay so what that allows us to do now is allows us to make our post route ki remember we're submitting our form to slash upload and we can then use that this upload variable as our middleware so that it actually uploads to the database alright let's put some comments here let's say route this is get slash and description will just say loads form okay and then we're gonna have a route of post to upload and the description will say uploads file to DB alright so let's say app dot post because it's gonna be a post request and it's gonna be to slash upload quest response now this is where we need to put in our middleware so right in the middle of the route and the the arrow function we're gonna take that upload variable and just call dot single and put a comma here now we're using single because we're just uploading a single file with multi you can actually upload multiple files as an array but we're not doing that it's just one file at a time now inside here you want to pass in the name that you use for the file field so in our form you can see for the file I use the name file if this was like my file or image or something like that that's what you would put in here avatar or something like that alright and then once that is uploaded let's just let's do a res dot jason just to see what we get back so I'll pass in file and we should be able to get request dot file and that'll give us the info all right so let's try it let's save and let's go to our form here and reload and let's grab something I'll grab this image and submit and there we go so this is the request dot file we're looking at it has a field name file original name the encoding the mime type the ID so we could do what we want with the this is the file name right here that was generated this had this string right here this long string is was generated through the crypto dot random bytes right here so we basically took control and said we want to name it this way if we wanted to use like a date or somehow implement that the timestamp or something like that we could name it however we want but I think that that's fine gives us the bucket name all that stuff all right now once we look we we upload our file actually let's check the database it's a good idea so if I reload there it is so it's had two chunks ok takes up two chunks but one file and if we look at the file it has all that stuff in it ok file name right here which is basically the most important that and the content type for what we're doing anyway and and now we're able to upload images all right so if you just asked me how do I upload an image then we're done but we're not because I want to build something a little more substantial so instead of returning the jason once we upload i just want to redirect back to the home page so we'll say res X I'll just comment that out and then we'll say res dot redirect back to slash alright so let's go back to the home page and now if I were to upload that script file submit and it's just gonna redirect us back ok it's not going to show anything down here yet we haven't done anything like that yet but if I reload now that file has been uploaded as well now before we get to showing the images here I want to create kind of an API where we can go to like slash files and then see an array of all the files in our database or slash file slash ID or file and I'm sorry the file name and see all the information of that particular file so let's create a couple more routes so we'll say routes and this is gonna be a get request to slash files and let's say description display all files in Jason alright so we'll say apt-get and we're gonna be using grit FS stream for this so let's say files request response and so in here we want to first check to see if the files exist will actually know first we need to find the files so we can kind of use grid FS stream like we would Mongoose like we would a mongoose model so we'll say g FS dot find and we want to turn this into an array so we're gonna say to array and that's gonna take in a callback I'm gonna use an arrow function and to array will take in an error if there is one and then files it'll return the files for us and then we'll check to see if that if any files exist so I'll say check if files so say if not files or the files dot length is equal to zero then we don't need a comment here then we'll just say return let's say res dot status and I want to send a 404 status and then dot Jason and in here we'll just pass in an object and we'll send an error and say no files exist okay and then we'll go after that if statement which means that files do exist and then we just want to return res dot Jason and I'm just gonna send the files array all right so let's save that and then if we go to localhost 5,000 slash files GFS dot find is not a function oh I'm sorry it's GFS dot files dot find and there we go so now we have an array of our files okay and we have two files in there so you could use this as just a backend API now I also want to just be able to go to files slash and then a file name and get just the single object just a single file so let's do that next so I'm gonna copy this whole thing this whole route and let's say get files slash and I mean we could use the ID but I think let's see should we use the ID I'm gonna do what I'm gonna do it for the image as well so it actually gets the the image path but we're going to use a different route we're gonna use slash image for that so I think yeah we will use the file name here so let's go down here and say files / colon file name and then what we want to do is instead of find we want to use find one and pass in here an object we want to say where file name is equal to request dot grams dot filenames so that'll this will get the file name from the URL okay from here and then we don't want the to array so we can actually get rid of all of this this whole - array and then this just takes the second parameter of a function and this is going to give us an error if there is one and then just the file itself the one file and then we can check for the file the same way we did here so I'll copy that except it's gonna be file not files and then we'll just say no file exists okay and then after that we'll say file exists and we'll return res jason and let's just pass in that single file all right so now let's go ahead and grab one of these file names so this one right here this jpg and we'll copy that and we'll say file slash that and there we go it gives us the single object with that file now if I throw another character in here we know that this doesn't exist let's go ahead and search for that we get an error no file exists all right all right now what I want to do is I want to have a route for images where we can go to images slash and then the file name and it'll actually display the image not just the data like this so for that we actually have to use something called read stream from grit FS stream which is let's see right here create read stream so we want to do something like this and that a lot that'll allow us to help with the image so let's create a new route I'm actually going to copy the one we just did and paste that and so this will be get well yeah we'll say get image and then the file name description display image I forgot the description here so this should be display single file object alright so let's change this to image and again we're going to just find one we're gonna find it by the file name this is all the same we're gonna keep the this check here to make sure it exists but then what I want to do is I want to check to make sure it's an image that the content type is either image JPEG or are let's say image PNG so we'll say check if image and I mean there's better ways to do this but I'm just going to do it the the easiest way that I can think of and that's just to see if file dot content type because we can get that as you can see right here content type let's check to see if it's equal to image slash JPEG or file dot content type is equal to image slash PNG alright I'll save that so if it is then we want to read the output or the stream image or the image so we'll just say read output to browser and if we look at the documentation for the stream you'll see that there's this create read stream this is what we want to do we basically just want these two lines right here okay so let's let's first of all change this to Const and then read stream equals GFS dot create read stream and then the option I'm gonna pass in is going to be the file name so file dot file name and then pass this in now this is going to be Reds not response because we're pertaining to this right here all right and then let's do an else so if it's not an image then we'll just do res dot status 404 dot Jason and let's pass along here an error it will just say not an image all right so let's save that and let's see if that works so we'll go to let's grab this file name here that we know exists in the database and is an image and we'll pass that here but we don't want files we want the route image okay because that's what we used right here so let's try that out and there it is so there's the image now if we pass in let's see in our database we have a text file let's take that which doesn't have the content type that matches PNG or JPEG so it should just give us the error let's try it there we go not an image all right so now what I want to do is take care of displaying the images are displaying the files in our view so right here I want them to display under underneath our form so we're gonna go back up to the route right here right here get slash and we're gonna do a couple things here we want to find all the images and I guess we could just copy it from slash files where we already did this this find dot to array so we just want to get that let's see the to array ends right here I'm just gonna grab that whole thing and let's go back up here and we'll just replace this so it's gonna find the files and we want to check to see if they're images all right so after this okay we're gonna check to see if there's any files except we're not returning Jason if there is no files then we want to res dot render index and we want to pass along an object with files false okay else if there are files in the database we first want to map through them and we want to decide which which one's our images and which ones are not because remember if there are images we want to display them so we can use map for that which is a high order array function so we'll do files dot map okay so we're gonna map through that map takes in a callback or an arrow function actually it's just one parameter so we don't need extra parentheses so we'll save file and in here I'm just gonna do a test just like we did below to see if file dot content type is equal to what is an image slash JPEG or content type is equal to image / PNG so if that's true what I'm gonna do is set a new value on to the file object called is image and we're gonna set that to true else we're gonna set file dot is image to false alright and then finally we're going to render the index I'll just copy this so we want to go outside of the map which ends right here and just render that but instead of rendering false we want to render files okay which now each one will now have this is image because we we used map map is very powerful I love this this friggin function all right so let's try it we'll save well actually we can't try it yet because we haven't add we added the ejs markup so that this will actually do anything or show anything so let's go to our index ejs file and let's go under let's see let's go under the form I'm gonna put an HR here and then we want to do a couple of when we actually want to do a few things we want to first check to see if files is true or false remember if no files are found then this files value will be false so ejs syntax if you guys have never used it is like this so it's gonna be an angle bracket a percent and we can put JavaScript in here we can say if files open curly brace and then close this line like that all right and then we want an L so again ejs syntax else actually should be a else ejs I really liked really convenient but it is a little bit ugly let's see so this is just gonna be ending it like that all right so if files actually let's do the else first so if there's no files then we'll just put a paragraph and we'll say no files to show okay but if there are files found then we want to loop through them so again we're going to use ejs syntax and say files and we can use a for each loop here so files dot for each let's see files for each and then this actually takes in let's close this off this takes in a callback function like that and actually you know what this part we need to cut off and put down here all right so we're gonna look through and then pass into the callback just file and now I'm gonna put everything inside of a bootstrap card so I'm gonna say a class of card let's also do a class of card body and a class of margin bottom three all right now and here is where we want to check to see if it's an image because if it's an image we want to put it inside of an image tag if not we just want to display the file name so again we'll use our ejs and use if and we'll say if file if the current iteration the current file is image is true this isn't the easiest type stuff to type so I apologize if it's kind of slow and then down here we want to do an else and then we want to end it alright so if it's an image then let's put in an image tag and the source will be image slash remember the route the route so we can go to image slash and then the font the file name so the file name is going to be dynamic so we'll use ejs now if we're just outputting a single variable we need to put in an equal sign here and then we can say file dot file name and close that off all right if it's not an image then we're simply going to put in file dot file name like that all right so let's try it we'll save now I'm using prettier which just kind of messed everything up for us didn't make it it made it uglier but whatever that's fine so let's see something's going wrong here it's showing the the text title can't set headers after they're sent all right so something's going on here ah 76 returned Jason's files turn red so Jason oh this shouldn't even be here this is left over from what we copied all right let's try that all right now it's working but the image looks a little messed up so what I'm gonna do is just add a style tag in here up in the head and let's just say for all images we'll say with 100% there we go all right so we got our image and we have our text file name and you could link this to the actual file if you wanted to but we're running out of time you know this is getting wicked long next thing I want to do is the delete now remember we use that we installed the method override that's going to allow us to use a form to use it to use it as a delete button that will make an actual delete request so I'm gonna go down let's see so inside the card right above the ending div because it doesn't matter if it's fun if it's an image or not and we're gonna put in a form and the action is gonna be slash files slash and then we want the file ID okay and we can get that wait do we want the ID or the name [Music] let's see yeah we want the file ID I think we could we could use the file name but we're gonna use the ID and we can get that using ejs so we're gonna say % equals and let's do file dot underscore ID okay and then we're gonna put method post but it's not actually gonna be a post request it's good we're using method override and I'll show you how we do that we do that by adding on a query string right here so we'll say question mark and then underscore method equals delete because we really want it to be a delete request all right and then all this form is gonna have is a button will give it a class of BTN let's do BTN - danger BTN - block and margin top four all right we'll say delete so let's save that okay now we have our delete buttons and you can see it's actually making a delete request because of this query right here so let's go back to our app J s and let's handle that delete request so down at the bottom let's say route is gonna be delete slash files slash ID and we'll put a description and we'll say delete file ok so app dot delete and in here it's gonna be slash files / : ID and say request response and in here what we want to do now is use our grit FS stream and we can use remove so right here removing files g FS dot remove pass in options which can be an ID or a file name okay or at least an idea a file name so let's go ahead and do that we'll say g FS so you can see we're using the g if the grid FS file stream kind of like you would use a mongoose model so it's a g FS remove and then pass in an object woops and we'll say we're underscore ID is equal to request dot params dot ID now one thing there they don't show you in the documentation is you also need to include the collection in root so we need to say root and then uploads alright i that kind of stumped me for a while and then put a function here and this will actually give us error and grid store okay we don't need the grid store for anything but it does give it to us and we'll check for an error and if there's an error we'll go ahead and return 404 dot Jason let's do error and it will just pass that error value all right if not then we just want to redirect and that's it so hopefully that works let's go ahead and reload and let's go to our text file here and click delete and there it goes and now if we check our database reload that text file is now gone all right so our application is now complete I would say our application and our API because we can also go to not image but files and see our files and we can do slash file name so hopefully this gives you guys some insight on how to do this and how you could implement it into your own applications you might not do all of this stuff you may just do the simple upload but I wanted to go a little more in depth and and kind of give you some insight on on how to use both of the the the multi grit FS and the grit FS stream so that you can kind of manipulate your your file streams and you have other stuff here to like write streams create write streams other stuff as well so you may want to look more into it but that's gonna be it guys sorry that this video was so long it's kind of late and my brain is kind of thinking a little bit slow but if you liked it please leave it a like and if you're not subscribed and you like this type of content please consider subscribing and that's it thanks coding dojo is a programming school that turns beginners into developers in only 14 weeks if you're serious about landing a career in tech but lack the formal education or background coding dojo will get you there in no time with over 3,000 graduates to date over 90% of their grads land jobs within three months of graduating often making over 70 K per year at tech firms of all sizes from companies like Google to local startups to learn more visit coding dojo com or click the link in the description below
Info
Channel: Traversy Media
Views: 213,402
Rating: undefined out of 5
Keywords: mongodb, mongodb gridfs, gridfs, node upload files, node mongodb, mongodb image upload, mongodb images, node.js, node, multer
Id: 3f5Q9wDePzY
Channel Id: undefined
Length: 55min 22sec (3322 seconds)
Published: Mon Mar 05 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.