visheshd/grails-file-uploader — pull request #3 by danieldbower (2012-11-20 19:43:20+00:00)
Title: Code cleanup for Grails File Uploader, some additional features

I submitted this same pull request up to grails-file-uploader / grails-file-uploader, but as I used your repo for the source, I thought I'd send it your way as well.

Upgraded to Grails 2.1, pulled logic into service, dropped a controller, added refinements to storage.

New config options:
storageTypes = ['monthSubdirs', 'uuid']

Leaving off storageTypes will perform the existing behaviour, specifying the above will:
1. Drop the files in subdirectories by yearMonth instead of millisecond
2. Name the files on the file system as uuids instead of the name given by the user (to prevent collisions)

The uuid option can be used in any case, but the monthSubdirs option should really only be used with uuids, otherwise there is too great a chance for collision.