WEBVTT

00:00.360 --> 00:02.040
Hi everyone.

00:02.040 --> 00:09.760
In this video, let's continue with the upload avatar and cover photos for the users.

00:10.680 --> 00:17.320
And if you remember in the cloudinary we already have a controller for a blog.

00:17.680 --> 00:18.200
Okay?

00:18.680 --> 00:28.120
When we upload we will receive the data and based on the data, we will append us into the avatar and

00:28.120 --> 00:29.760
cover photo over here.

00:30.600 --> 00:33.360
Okay, that's what we want, right?

00:34.440 --> 00:39.120
So let me show you how to do that fully.

00:39.120 --> 00:44.120
I will create the one more thing, uh, with this here.

00:45.120 --> 00:50.360
Um, and we, we, uh, we don't need the row over here.

00:50.400 --> 00:51.200
Let's remove that.

00:51.200 --> 01:01.680
Also, I will create a get sorry post method with the upload avatar.

01:01.680 --> 01:01.710
Ababa.

01:03.350 --> 01:03.910
Right.

01:04.950 --> 01:07.510
And let me copy over here.

01:13.270 --> 01:15.550
Let me just.

01:17.990 --> 01:19.670
Read the current users.

01:20.390 --> 01:20.950
Okay.

01:24.230 --> 01:28.190
And now here we will apply avatar.

01:31.150 --> 01:33.870
Let's create a method for avatar.

01:34.630 --> 01:35.910
Go to the service.

01:39.390 --> 01:41.110
Create method.

01:48.630 --> 01:50.310
Under current users.

01:55.950 --> 01:58.270
Firstly we need to find users.

01:58.310 --> 01:58.830
Okay.

02:15.250 --> 02:22.690
We need to unify former and current user, not one.

02:24.210 --> 02:27.250
And we need to check if no user.

02:29.370 --> 02:34.850
Profile is user profile.

02:38.690 --> 02:44.130
After that we need to create a DTO for our blog.

02:44.370 --> 02:51.290
Okay, now let's say the DTO will be very similar with the post over here.

02:51.810 --> 02:57.490
But here we have something called a blog media video over here.

02:57.650 --> 02:58.170
Right?

03:00.330 --> 03:08.080
And this guy, We should celebrate this thing into another file.

03:09.000 --> 03:09.560
Okay.

03:11.000 --> 03:17.760
I will, uh, move the upload video into the glove box.

03:20.120 --> 03:20.640
Right here.

03:20.640 --> 03:24.040
I will create a little global.

03:25.760 --> 03:26.680
Okay I will.

03:29.160 --> 03:29.960
Move it up.

03:35.440 --> 03:39.560
Cut everything and move it to here.

03:42.920 --> 03:48.840
And let me show you where we need to use the block media video.

03:49.320 --> 03:52.200
And we need to reinvoke that again.

03:53.200 --> 03:53.760
Okay?

03:54.040 --> 03:55.360
We need to remove this.

03:57.920 --> 03:58.560
Epoch.

04:01.320 --> 04:04.030
Uh, block Familiarity.

04:08.870 --> 04:09.790
Rob Glover.

04:12.110 --> 04:12.590
Okay.

04:14.350 --> 04:16.270
That is, I deserve it.

04:16.390 --> 04:17.510
Let's do that.

04:26.630 --> 04:27.190
Over here.

04:27.750 --> 04:28.230
Okay.

04:31.790 --> 04:33.710
So that is.

04:34.270 --> 04:39.390
And we need to remove entire file.

04:44.870 --> 04:49.430
And go to the controller over here.

04:50.190 --> 04:54.950
We need to move the body, which is.

04:57.030 --> 04:57.670
Media.

05:04.270 --> 05:04.590
Block

05:13.250 --> 05:14.210
Like this one.

05:14.810 --> 05:21.050
And put that over here and go up and move that also.

05:26.810 --> 05:27.370
Okay.

05:28.290 --> 05:31.290
And we just need to amend that user dot.

05:33.730 --> 05:34.810
Dot profile.

05:35.330 --> 05:36.690
Sorry dot avatar.

05:37.370 --> 05:48.810
Click the upload media little and away users save and we can return directly over here.

05:55.690 --> 05:59.570
Okay let's test that.

06:04.410 --> 06:05.440
I will Okay.

06:16.240 --> 06:26.720
So the last method and right here we just need to put a little figure inside the body.

06:28.760 --> 06:31.480
Right here we should login first.

06:41.440 --> 06:51.400
After we upgrade we will I will close all the tab and click insert Cloudinary blog file okay.

06:51.960 --> 06:53.120
And insert the file right here.

06:53.120 --> 06:55.760
I will choose the file.

06:59.640 --> 07:01.920
Where we are you choose this thing.

07:04.000 --> 07:05.120
And say.

07:07.940 --> 07:08.780
After us.

07:08.820 --> 07:14.460
We need to copy everything right here and start over here.

07:20.140 --> 07:23.300
Okay, let me say, uh.

07:23.580 --> 07:24.060
Sorry.

07:25.620 --> 07:26.100
Block.

07:26.820 --> 07:27.460
Avatar.

07:30.540 --> 07:31.100
Okay.

07:31.140 --> 07:31.740
After us.

07:31.740 --> 07:36.660
We already got, uh, let me double check inside the database.

07:45.020 --> 07:47.420
So here we already have our data.

07:48.260 --> 07:48.740
Okay.

07:49.380 --> 07:54.860
And in order to respond, we just need to respond the URL.

07:55.700 --> 07:56.140
Okay?

07:56.180 --> 07:58.820
We just need to respond based on the information.

07:58.820 --> 08:03.220
We just need to return the URL for the data okay.

08:03.260 --> 08:05.460
We need to customize that.

08:05.620 --> 08:08.730
Let me show you what it you made in here.

08:10.850 --> 08:16.770
User one user I will have, uh, avatar.

08:17.050 --> 08:19.650
Um, we will stream.

08:19.810 --> 08:23.010
Okay, so how do we do that?

08:23.530 --> 08:29.490
If we remember inside the box, we have a similar method.

08:30.570 --> 08:41.730
This one was little, uh, in here, right click everything from the channel form over here, and I

08:41.730 --> 08:42.770
will put us.

08:43.930 --> 08:47.410
And it brought the transform and muscle with us.

08:48.610 --> 08:48.930
Alright.

08:48.930 --> 08:52.010
We will transform with this information.

08:55.770 --> 08:56.570
Object.

08:57.890 --> 09:02.170
From here we need to replenish inside.

09:02.170 --> 09:06.050
Here we need to return object avatar.

09:14.560 --> 09:15.200
So here.

09:22.280 --> 09:24.800
I'm not showing you the option of changing.

09:38.800 --> 09:40.640
Some stuff like that.

09:42.320 --> 09:44.760
And let me try this again.

09:47.000 --> 09:47.360
Okay.

09:47.360 --> 09:47.720
Right here.

09:47.720 --> 09:49.560
We already got the URL, right.

09:50.760 --> 09:53.160
Let me copy the URL and.

09:56.320 --> 09:56.880
Say.

09:59.120 --> 09:59.680
Okay.

09:59.680 --> 10:02.440
We already got the URL.

10:02.480 --> 10:03.400
Very very good.

10:03.400 --> 10:03.840
Right.

10:05.040 --> 10:06.640
We just need to restart.

10:06.800 --> 10:08.320
Restart the URL.

10:08.980 --> 10:14.580
Okay, actually I will rename a little bit will be after sorry.

10:16.140 --> 10:16.860
We go here.

10:17.340 --> 10:19.580
We got the avatar URL.

10:28.180 --> 10:28.660
Okay.

10:30.460 --> 10:37.220
And uh let me try to get on users okay.

10:37.220 --> 10:39.260
We also have a avatar.

10:39.660 --> 10:41.020
So very very good.

10:41.460 --> 10:44.020
And that is just for the video.

10:44.660 --> 10:46.580
I will see you in the next one.

10:46.940 --> 10:50.060
And, uh, I have a little exercise for you.

10:50.660 --> 10:55.980
Now let's do the similar but for the backgrounds.

11:01.500 --> 11:01.940
Okay.

11:01.940 --> 11:07.940
For a background photo over here and I will see you in the next one.

11:07.940 --> 11:09.940
So down the job.
