1
00:00:08,670 --> 00:00:14,460
Welcome to brand new section and that is file upload.

2
00:00:14,820 --> 00:00:25,380
So when we say file upload is a process of allowing a user to send files such as images, videos, audios

3
00:00:25,380 --> 00:00:27,450
into our application.

4
00:00:27,600 --> 00:00:36,170
So for this, we need a way to save the images or the asset a user is trying to upload into our server

5
00:00:36,180 --> 00:00:38,430
and we have couple of them.

6
00:00:38,700 --> 00:00:46,380
Let's say that this is our server and we want a user to upload images, so let's see the options that

7
00:00:46,380 --> 00:00:47,100
we have.

8
00:00:47,340 --> 00:00:56,340
The first option is we can save the uploaded asset or images into the file system and the next option

9
00:00:56,340 --> 00:01:03,870
is we can save the images or the asset into our database, for example, MongoDB.

10
00:01:04,170 --> 00:01:10,590
The next option is we can upload the images to a third party server.

11
00:01:10,710 --> 00:01:14,970
So among this one, which one is the best way to go?

12
00:01:15,240 --> 00:01:24,000
If you try to save images into the file system one, the images will be hosted on the user's machine.

13
00:01:24,240 --> 00:01:32,100
So for this option, let's say if a user machine get crashed or the user accidentally deletes, the

14
00:01:32,100 --> 00:01:35,130
file is going to affect the application.

15
00:01:35,400 --> 00:01:42,180
If we choose to save images into the database, one is going to slow down your application.

16
00:01:42,240 --> 00:01:49,080
And two, you can exceed the database limit because some files are really big.

17
00:01:49,560 --> 00:01:54,420
So the best way to go is to use a third party server.

18
00:01:54,450 --> 00:02:00,740
And for this we have couple of them talking about A.W. s and Cloud Ordinary.

19
00:02:00,810 --> 00:02:09,090
So for our case, we are going to stick to the cloud that is a third party server to better understand

20
00:02:09,090 --> 00:02:16,890
the flow, how we can upload file to a third party server unless you have an idea how we can send file

21
00:02:16,890 --> 00:02:18,360
to the file system.

22
00:02:18,390 --> 00:02:25,950
So first I will show you how we can upload files into the file system and then we move on to the third

23
00:02:25,950 --> 00:02:27,600
party server.

24
00:02:27,780 --> 00:02:28,350
All right.

25
00:02:28,350 --> 00:02:30,270
The next video, let's get started.

