Skip to content
/ gwtupld Public

File uploader for GWT with drag'n'drop, multiple file selection and graceful fallback for outdated browsers.

Notifications You must be signed in to change notification settings

kompot/gwtupld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gwtupld

File uploader for GWT with drag’n’drop, multiple file selection
and graceful fallback for old browsers.

Features

  • Drag’n’drop support in …
  • Multiple file selection in …
  • Progress bar in …
  • XHR file upload in …
  • Fallback to hidden iframe for all others
  • Doesn’t require Flash or anything but GWT
  • File size & extension verification
  • Able to append parameters along with file upload
  • State retention – set files on load

To be implemented

  • Delete button for files stored on server (that are set
    via state retention mechanism)
  • Cancel button for XHR uploads

Developing and testing

This component is based on code of `file-uploader` project.
https://github.com/valums/file-uploader
Basically it is just a rewriting of it to GWT.

All you need to run it locally is to use the following command

gradlew gwtcompile devmode

If you are using GWT developer plugin and it’s not the first run then use just

gradlew devmode

There is a servlet (UploadServlet) available for testing that will save uploaded
files to temp directory. So feel free to test and debug.

There is a problem with testing iframe uploading as you need protocol, host and
port to be exactly the same for parent document and for iframe used for posting
form to be able to get contents of the iframe (JS security restriction). So you
can set up a proxy (I prefer nginx) with the following configuration:

server {
  listen 8082;

  client_max_body_size 2000M;

  location ~* ^/gwtupld/ {
    proxy_pass http://127.0.0.1:8080;
  }

  location ~* ^/editor/ {
    proxy_pass http://127.0.1.1:8081;
  }
}

And then just replace port 8081 with 8082 in the address bar when testing.
All requests will go to port 8082 and then dispatched to appropriate locations.

About

File uploader for GWT with drag'n'drop, multiple file selection and graceful fallback for outdated browsers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published