-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme.md.bak
35 lines (23 loc) · 967 Bytes
/
Readme.md.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Spring Boot File Upload / Download Rest API Example
**Tutorial**: [Uploading an Downloading files with Spring Boot](https://www.callicoder.com/spring-boot-file-upload-download-rest-api-example/)
## Steps to Setup
**1. Clone the repository**
```bash
git clone https://github.com/callicoder/spring-boot-file-upload-download-rest-api-example.git
```
**2. Specify the file uploads directory**
Open `src/main/resources/application.properties` file and change the property `file.upload-dir` to the path where you want the uploaded files to be stored.
```
file.upload-dir=/Users/callicoder/uploads
```
**2. Run the app using maven**
```bash
cd spring-boot-file-upload-download-rest-api-example
mvn spring-boot:run
```
That's it! The application can be accessed at `http://localhost:8080`.
You may also package the application in the form of a jar and then run the jar file like so -
```bash
mvn clean package
java -jar target/file-demo-0.0.1-SNAPSHOT.jar
```