Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Paperclip with minio

Deepak Sharma edited this page Nov 8, 2016 · 1 revision

minio is an Amazon S3 compatible object storage.

see: https://minio.io/

Use gems “aws-sdk” and “paperclip”

Set default configuration as mentioned below, if you wish to use different buckets/servers in different environments please set configuration in config/environments/ files

For more details please refer to https://github.com/thoughtbot/paperclip#defaults

config.paperclip_defaults = {
  storage: :s3,
  s3_protocol: ':https',
  s3_permissions: 'private',
  s3_region: 'us-east-1', 
  s3_credentials: {
    bucket: 'testbucket',
    access_key_id: 'Q3AM3UQ867SPQQA43P2F',
    secret_access_key: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
  },
  s3_host_name: 'play.minio.io:9000',
  s3_options: {
    endpoint: "https://play.minio.io:9000", # for aws-sdk
    force_path_style: true # for aws-sdk (required for minio)
  },
  url: ':s3_path_url'
}