File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ This is a Next.js API route that facilitates file uploads from the client-side a
13
13
## Prerequisites
14
14
15
15
Before you get started, make sure you have the following:
16
+
16
17
- Node.js (v12 or higher recommended)
17
18
- An Azure Storage account with access keys.
18
19
- An Azure Blob Container created in your Storage account.
@@ -24,24 +25,32 @@ These instructions will get you a copy of the project up and running on your loc
24
25
### Installation
25
26
26
27
1 . Clone the repository:
28
+
27
29
``` bash
28
30
git clone https://github.com/your-github-username/your-repo-name.git
29
31
cd file-uploader-api
30
32
```
33
+
31
34
2 . Install NPM packages:
35
+
32
36
``` bash
33
37
npm install
34
38
```
39
+
35
40
3 . Create a ` .env.local ` file in the root of your project and populate with configurations from ` .env.example ` .
36
41
37
42
### Running the project
43
+
38
44
After installation, you can start the development server:
45
+
39
46
``` bash
40
47
npm run dev
41
48
```
49
+
42
50
Open ` http://localhost:3000 ` with your browser to see the file uploader component where you can upload files to azure blob storage.
43
51
44
52
### API Reference
53
+
45
54
#### POST /api/upload
46
- Accepts a multipart/form-data request with a field named files which should contain the files to be uploaded.
47
55
56
+ Accepts a multipart/form-data request with a field named files which should contain the files to be uploaded.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " file-uploader" ,
3
- "version" : " 0.1 .0" ,
3
+ "version" : " 1.0 .0" ,
4
4
"private" : true ,
5
5
"scripts" : {
6
6
"dev" : " next dev" ,
You can’t perform that action at this time.
0 commit comments