- Notifications
You must be signed in to change notification settings - Fork4
A Grails plugin to provide multi purpose file uploader functionality.
License
wizpanda/multi-file-upload
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A plugin for multi-purpose file upload functionality for Grails 3+ application. This plugin allows uploading & saving filesto the following destinations:
- To the local server or the local system.
- To the Amazon S3 storage (can be deleted as well).
The upload APIs are highly customizable, so you can always override the classes or add your own implementation.
Add the following tobuild.gradle file of your Grails 3 application
Underrepositories section
maven { url"https://jitpack.io" }Underdependencies section
compile"com.wizpanda:multi-file-upload:<version>"In theapplication.groovy file, define your groups & AWS configuration. For example:
fileUpload { global { amazon { accessKey="EXAMPLE-KEY-ALIAI4VT211NNPSV3YGQ2" accessSecret="EXAMPLE-SECRET-803a3E2Ul0HkImA2kLQAyF4ngM3P6St" } } groups { fooSliderImages {// Add the service which you want to configure here service=com.wizpanda.file.service.AmazonS3UploaderService container="foo-images" cacheControlSeconds=604800// 1 week } }}Readdocs/aws-access-configuration.md to read how to get the access key & secret for AWS S3.
fileUploadService.save(params.file,"fooSliderImages")
The containers defined in the configuration above i.e.foo-images are suffixed with environment name for non-production environment.For example, an S3 container with the namefoo-images-development will be used when running locally. So that container must be therebefore.
This means, you don't need to use Grails environments to use the different buckets for different environments.
About
A Grails plugin to provide multi purpose file uploader functionality.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.