Manages storage of multipart file uploads in Spring MVC applications
Java Groovy HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
core/src Update JavaDoc Apr 19, 2016
example-app Update JavaDoc Apr 19, 2016
gradle/wrapper Update Gradle to 2.12 Apr 4, 2016
mvc Update Gradle to 2.12 Apr 4, 2016
.gitignore Project setup Feb 28, 2015
.travis.yml
LICENSE Change LICENSE to Public Domain Apr 4, 2016
README.md Update README.md Apr 19, 2016
build.gradle Upgrade Spring dependencies to v4.2.5 Apr 4, 2016
gradlew
gradlew.bat Project setup Feb 28, 2015
settings.gradle Spring MVC integration Mar 1, 2015

README.md

Spring File Upload Storage Build Status

Utility library for managing the temporary storage of multipart file uploads in Spring MVC applications.

Problem

Spring MVC has a convenient abstraction for handling file uploads through multipart requests. But where do you store uploaded files during user interactions that span multiple HTTP requests? For example, in a multi-page form.

  • Storing uploads as temporary files on the filesystem is easily implemented, but is not the most secure approach when dealing with privacy-sensitive information.
  • Storing uploads as database BLOBs is more secure, but is not trivial to implement.
  • You also need a way to manage uploads in a timely manner, not keeping files around longer than necessary.

Spring File Upload Storage aims to address these issues.

Approach

  • Stores uploaded files in a database.
  • Works with any database that supports JDBC and SQL.
  • Maintains files using a time-to-live mechanism.
  • Cleans up expired files automatically.

Core API

Example app

The Example app shows to use the library in a Spring Boot web app.

Dependencies

  • Java 1.6+
  • Spring 4.0+, specifically these libraries
    • spring-web
    • spring-jdbc
  • slf4j-api

Build

# *NIX
./gradlew

# Windows
./gradlew.bat

License

Public Domain