I will come back and after talking about resource control, the desert is in session to talk about the
file management funds management, how we can manage.
First phase is a phase like image, for example, images.
And because at the end, the purpose of the session is just to prepare you for our projects, for the
project that we are going to be developing.
And the first thing I'm going to do, I'm going to come first for my creative later this year.
We are going to add a in order in our inputs.
In other words, we're going to create an input having a file type.
I think that's really dancing and talks about its boundaries.
And I think that's right now.
Puts it in a safe, for example, creates.
Interest-free AIDS.
In the area going to AIDS, I think we need an image between the product before the product description.
We going copy all this
down, hard to define and import, having a real remove the label and we just say file input if you
want, for example, to define any puts an effort by using the collective.
You have just put files here and they would not have to put a second because you need just to put the
product image.
I guess if it's important for the image in these moments, we are going to see if images uploaded upload
images in the database.
So I want us to show you something and then I'm going to prepare you for a project that we are going
to be developing in this course.
And here we do remove the placeholder.
We're going to leave only class control this.
And if we go back here and if we try to reload a page and.
Yes, you can see we have to fight here it is click here and they will have it.
So as you can see, this is already.
File, which was filed in port.
OK, so what do we do?
And then we're going to have the penalties for product image here and we are using the created Blade
PSP, which is Dnipro, that's fully resource controller.
So let us come to the police controller, which is our controller, and we are going to come in already
creates here because after it is really going to stop and we are going to make our exercises here and
we're going to see if I'm going to commit you save function like this.
And yes, like this and here I'm going to some something here.
I'm going to say, for example.
To say product image.
Image and here I say, for example.
Image.
And.
Lilibeth, like this mealybug.
Max.
Well, the.
No.
Nineteen ninety nine like this image marks, like these products and these cause means if you applaud,
if you want to upload an image and its size greater in two megabytes and then A, your rendition will
be canceled.
This is mean these these calls and you should only upload an image with its size and less than two megabytes.
And this is what's wrong here.
And if I make here, I'm going to say, for example, only two to use two.
To play with this image and impressive resume pawprints.
The image is and Congress requests.
She handles requests and here we are going to say in Puerto Rico, say request file to show that the
same inputs E has faltered and they're here.
We're going to say a request filed.
We don't say product.
Product image like this, so let's make first sort to three words reallocates, I'm going to reload,
first of all.
And an.
I'm going to make something I'm going to feel something here.
So let us let the image anorectic, for example, the image they just click on add products.
And the way.
Those.
Chef Max Ledeboer.
OK, yes, as you can see, it was validating.
We are ready to take the same page.
It doesn't work well, and if I click on Validate, I'm ready to do the same page and let's clear the
image because we have to put a match to it and attributes in our form.
So let us go back to our creator.
We're going to and we're going to add in attribute with that record in type, because if you let's say
use add these into attributes.
And you're right, you can't validate the form having, for example, files.
And here we are going to come here and it in new set of our screen brackets.
Regla say in type in type like this.
And they're going to say.
Mirit.
Slush.
A phone nudge data like this, and then we must save and the data let let us restore reloads, let us
page and going put some information here and let us through the file and let us take this file.
It is clean up and products.
As you can see, we have succeeded and the image is this.
And hence you can see this name is encoded.
We don't have the really name of our image because if we go back here, you can see the real name is
called profile dot jpg.
But if we try to ID product, click on add products to display the name of this image, we have this
and the how to display the original name of an image we need just to call a function in there are going
to create this variable here and there.
We going to say.
Filing with extension, he sees the region in need of an image, we have the file name and we have also
the extension and they're ready for a variable called this variable file name wave extension, like
the swift extension.
And finally, with extension and how to get funding for station extension because the requests fail.
And so we're going to pause products image.
Products, image and sheer tech dysfunction get.
A good client, a regional.
Then like this, and if you do that, you can display it, really name the original name of your image,
your file, you're going to display the name and the extension of your file, and we're going to send
your original name.
He's in Syria, going to put a file in police station here and they're going to print it does make sure
it does click on we should get a profile.
Not so they just click on it products.
As you can see, we have succeeded through Prince.
They really named the original name the Kaname Underscore, Underscore Profundo, DPG.
And this is the original and with the extension and the what to do, for example, if he wants, for
example, to Prince only to get only the filename and not extension.
So we are going to call a function here.
We call this.
I'm going to say, yes, I'm going to create a new variable and call this I'm going to call these variable
filename Latisse and I'm going to set equal to I'm going to call this function puff in info above you
for.
And here I'm going to say a.
Analysts say puff info may certainly puff if I'm going to take the full name with extension with a couple
different.
I would have pulled the trigger and I'm going to put a comma and I'm going to say Puff.