Skip to content

Commit 0499aa9

Browse files
author
Andrea Zanelli
committed
Update file-upload-with-ajax to Spring Boot 1.3.5 and Java 8
1 parent e67bf3c commit 0499aa9

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

spring-boot-file-upload-with-ajax/pom.xml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project
3-
xmlns="http://maven.apache.org/POM/4.0.0"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6-
<modelVersion>4.0.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
75

86
<groupId>netgloo</groupId>
97
<artifactId>spring-boot-file-upload-with-ajax</artifactId>
@@ -16,14 +14,13 @@
1614
<parent>
1715
<groupId>org.springframework.boot</groupId>
1816
<artifactId>spring-boot-starter-parent</artifactId>
19-
<version>1.2.3.RELEASE</version>
17+
<version>1.3.5.RELEASE</version>
2018
<relativePath /> <!-- lookup parent from repository -->
2119
</parent>
2220

2321
<properties>
2422
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
25-
<start-class>netgloo.Application</start-class>
26-
<java.version>1.7</java.version>
23+
<java.version>1.8</java.version>
2724
</properties>
2825

2926
<dependencies>

spring-boot-file-upload-with-ajax/readme.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ How to uploading a file using Ajax with a Spring Boot web application server sid
55
See here for more informations:
66
http://blog.netgloo.com/2015/02/08/spring-boot-file-upload-with-ajax/
77

8-
### Usage
9-
10-
- Launch the application and go on http://localhost:8080/
11-
- Click the *Browse...* button and choose a file to upload (of size less
12-
than 3MB)
13-
- Go in the directory you have set in the `application.properties` file: the
14-
uploaded file will be copied here.
15-
168
### Build and run
179

1810
#### Configurations
@@ -21,8 +13,8 @@ Open the `application.properties` file and set your own configurations.
2113

2214
#### Prerequisites
2315

24-
- Java 7 or 8
25-
- Maven 3
16+
- Java 8
17+
- Maven > 3.0
2618

2719
#### Using the terminal
2820

@@ -33,3 +25,13 @@ Go on the project's root folder, then type:
3325
#### From Eclipse (Spring Tool Suite)
3426

3527
Import as *Existing Maven Project* and run it as *Spring Boot App*.
28+
29+
30+
### Usage
31+
32+
- Launch the application and go on http://localhost:8080/
33+
- Click the *Browse...* button and choose a file to upload (of size less
34+
than 3MB)
35+
- Go in the directory you have set in the `application.properties` file: the
36+
uploaded file will be copied here.
37+

spring-boot-file-upload-with-ajax/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Directory where will be saved uploaded files. Make sure that the application
66
# have write permissions on such directory.
7-
netgloo.paths.uploadedFiles = /var/netgloo_blog/uploaded_files
7+
netgloo.paths.uploadedFiles = /var/netgloo_blog/uploads
88

99
# ========================
1010
# SPRING BOOT: MULTIPART

spring-boot-file-upload-with-ajax/src/main/resources/static/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
<span id="upload-file-message"></span>
1717
</form>
1818
<br />
19+
<hr />
1920
Proudly handcrafted by
20-
<a href='http://netgloo.com/en'>netgloo</a> :)
21+
<a href='http://netgloo.com/en'>Netgloo</a> :)
2122

2223
<!-- Javascript functions -->
2324
<script>

0 commit comments

Comments
 (0)