Skip to content

lboullo0/fileUpload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FileUpload

Spring MVC (blueimp) jQuery File Upload. Based on blueimp's Grails plugin, just ported it back to spring mvc.

Run

mvn tomcat7:run

The application is going to tell you its up, after it does go to http://localhost:8080 and check it out.

Main tools

  • Spring MVC 3.2.1
  • Hibernate 4.1.9
  • H2 (embedded)
  • logback

Details

To change the size of the uploads you can find that on WebConfig.java

    /**
     * Supports FileUploads.
     */
    @Bean
    public MultipartResolver multipartResolver() {
        CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
        multipartResolver.setMaxUploadSize(5000000);
        return multipartResolver;
    }

Is set to < 5Mb by default but you can change it to what you need.

To change to a different database, you need to add the driver dependency on the pom.xml and change the database connection information in fileUpload.properties.

It's configured by default to upload the file & a created thumbnail for that file to your machine's /tmp folder. To change that folder just change it in fileUpload.properties.

If you have any issues with it please let me know. If you have any suggestions, great! Make a pull request.

About

Spring MVC (blueimp) jQuery File Upload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published