Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Grails plugin to provide multi purpose file uploader functionality.

License

NotificationsYou must be signed in to change notification settings

wizpanda/multi-file-upload

Repository files navigation

GitHub versionRelease

A plugin for multi-purpose file upload functionality for Grails 3+ application. This plugin allows uploading & saving filesto the following destinations:

  1. To the local server or the local system.
  2. 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.

Installation & Usage

Installation

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>"

Configuration

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.

Using in controllers or services

fileUploadService.save(params.file,"fooSliderImages")

Uses of containers/buckets

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

Stars

Watchers

Forks

Packages

 
 
 

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp