One of the most difficult thing is video crashing.
I can handle the video crashing and I can rerecord the videos.
No problem at all with the smile.
I can do it again.
But the problem is I have to move back onto the code onto that stage where it was creating a problem
and it spoils the fun some time.
So at this point you might be thinking, Hey, everything is working.
Spoiler alert, it's not going to work, so let's go ahead and try this out.
So we just went up here.
We go ahead and say, Hey, this is going to be test this one.
Let's go ahead and say another test and let's choose a file as well.
I'm going to go ahead and say hey again, let's classic go pag and just submit this one.
It says, hey, I'm taking the first name, I'm taking the last name, I'm taking the sample.
So it looks good this time.
And we did talked a lot about these middle layers and all of that temporary directories and options,
but still it gives us this undefined.
So what is going on wrong with that?
Now, this is exactly where the things come in for the front end developer.
The reason why I'm showing you this, because it is necessary for us and probably I'll create a dedicated,
separate front end course where I talk about this much of detail.
Probably next year somehow I'll do that.
Let's go back and see that.
How we can fix this one.
Now, this is a classic issue on the front end part.
It is not your fault you are handling this absolutely nicely with this video option.
There's a file upload, file options and all of this post option.
This is all it is required from your side.
Now let's go back up here.
Now, the problem is actually this form is not yet ready to accept these images.
Now, images are not like text.
Yes, these express and all that helps us to convert that into just request or body.
But this form is of different type.
It needs to mention that this is encryption type in majority of the time when we work in the front end,
we don't take care about that.
This is the by default option which says application slash x w w w form URL code n and this is exactly
what you see up here into the postman as well.
This is kind of a front end thing, but since this is not a form which is URL encoded, this is a different
type of category.
This is let me go ahead and see if it suggests me something.
No, let me go ahead and write that again.
Come on, escape.
Let me try to write that.
So whenever you're going to write this one notice here we have a couple of things.
This one is multipart form data.
Yes, that's it.
Told you it is a front end thing.
It is not in your fault.
Let me go ahead and show you a couple of more things that are really, really interesting up here.
I go ahead.
Save this one, hit my server, save so that it reloads.
Go back up here.
Go back here and hit a reload here so that everything resets.
Now, go ahead and let's try it here.
So I'm going to go ahead and say hit dash and another test and let's choose a file this time.
This file knows that I need to carry some data.
So notice how behave how it is going to behave so differently.
When I go ahead and hit submit, it says, Hey, this is all I need to carry first name and last name.
Because notice this time we have explicitly mentioned that you'll be carrying data, you'll be carrying
the files as well.
When I go back on to this one here and voila, this time say this one.
We have received some of the data and we have received the file as well.
So everything is done.
So again, there are a couple of ways you can ask your frontend developer to send a data URL that is
all good, or you can just go ahead and do and take care of everything onto your back end part.
But there is a little bit more there is a little bit more to it.
Now notice here how the data is coming in.
Data says, it says, hey, this is a buffer data and the sizes and all of that.
But what if I told you something different that what we have seen so far, this file upload and you
might be thinking this is doing all the magic.
No, this is not doing all the magic.
You might be wrong.
The part that we wrote in the form itself that is doing the magic, but this is also required.
Let me show you how it goes.
Now, if you go ahead and cut this out and save this one again, let's try to fill out the form one
more time.
And this might surprise you, might catch you off, guard it as well.
Reload that.
Let's go ahead and say test and go ahead and say another test.
Choose the file again, which is going to be again, you know it classic Gopi and G and select that
and hit submit it goes nicely.
I go back and come back here and I try to compare this and it says, okay, the data is coming in.
The only difference that I'm able to kind of visually see that this time it says data buffer and this
time it just expands the data.
Rest of all, the things are exactly same, and that's why I chose the simple same image up here.
So we just studied that for nothing.
No, not like that.
I need to put that back up again.
So all these options are important.
Now, these options are going to come in handy when you either use this move function, it gives you
a move function in case you want to move the data onto your directory or your your servers, or you
might want to upload them onto some cloud eight of us or something at that time.
These options are going to become life saver, but again, this is all fun.
So let's carry on this video and we are going to talk about uploading files onto the cloud.
But in the next video, let's go ahead and catch up in the next one.