Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qinmingyuan/qiniu_rails
Qiniu backend for Activestorage, with QiniuHelper for independent use and sprockets support
https://github.com/qinmingyuan/qiniu_rails
activestorage qiniu rails sprockets
Last synced: 8 days ago
JSON representation
Qiniu backend for Activestorage, with QiniuHelper for independent use and sprockets support
- Host: GitHub
- URL: https://github.com/qinmingyuan/qiniu_rails
- Owner: qinmingyuan
- License: lgpl-3.0
- Created: 2017-10-27T06:43:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-06T15:34:20.000Z (about 5 years ago)
- Last Synced: 2024-04-25T04:02:07.962Z (9 months ago)
- Topics: activestorage, qiniu, rails, sprockets
- Language: Ruby
- Homepage:
- Size: 2.85 MB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Qiniu Rails
qiniu backend for activestorage and more## Features
* Qiniu backend for activestorage;
* QiniuHelper for simple independent use;
* Qiniu extends for sprockets## Config
```yaml
# config/storage.yml
qiniu:
service: Qiniu
host: assets.work.design
access_key: <%= Rails.application.credentials.dig(:qiniu, :access_key) %>
secret_key: <%= Rails.application.credentials.dig(:qiniu, :secret_key) %>
bucket: work_design
notify_url: xxx
private: true
protocol: https
keep: false # 是否真正删除
block: false # 是否启用分片上传
```## Installation
Add this line to your application's Gemfile:```ruby
gem 'qiniu_rails'
```And then execute:
```bash
$ bundle
```Or install it yourself as:
```bash
$ gem install qiniu_rails
```## Direct Upload
* dependent on JS http client sdk `axios`, please add it to your rails project first;
* then `require qiniu_direct_upload` in js file where you used qiniu direct upload;## Assets Sync(Sprockets) support
* add `Sprockets.sync = 'qiniu'` to your initializers file## Contributing
Contribution directions go here.## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).