0.0
No commit activity in last 3 years
No release in over 3 years
selectel(https://selectel.ru/) s3 uploading files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0

Runtime

 Project Readme

Selectel::S3

Uploading files to selectel s3 store (https://developers.selectel.ru/docs/cloud-services/cloud-storage/s3/storage_s3_api/)

Installation

Add this line to your application's Gemfile:

gem 'selectel-s3'

And then execute:

$ bundle

Or install it yourself as:

$ gem install selectel-s3

Usage

Configuration

  Selectel::S3.configure do |config|
    config.access_key_id = 'access_key_id'
    config.secret_access_key = 'secret_access_key'
    config.endpoint = 'https://s3.selcdn.ru' # default value
    config.region = 'ru-1' # default value
  end

Code example

  require 'selectel/s3/uploader'


  uploader = Selectel::S3::Uploader.new('container_name')

  # upload a local file
  uploader.upload_file('local_file_path', 'remote_path')
  # upload a local folder
  uploader.upload_folder('local_folder_path', 'remote_folder_path')
  # upload a remote file
  uploader.upload_remote_file('file_url', 'remote_path')

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/selectel-s3. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Selectel::S3 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.