carrierwave-tencent_cos 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +28 -4
- data/lib/carrierwave/tencent_cos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b650db7b7c8e6101d8b07f8a888798e15e5828
|
4
|
+
data.tar.gz: 84d01558adff5585ea9a6eafb52f80bc9ee246fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c28a27a94c9706d3cfeeded99b65e4cc8b868e6fb6cb21abce556f3a538ddc5a25f17375b4eee85ff305d1ffab1835716d409b34f7ac714dd03f2d649cf72cf3
|
7
|
+
data.tar.gz: 0c2203871ee75c3c66746aefd2628728269054b6128b3f804a49a9d98b9410b88cc735c3b3192f5d012d5ad57748d14813bb589f832342864a5fad59f6885237
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# CarrierWave::TencentCos
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem adds storage support for Tencent COS to CarrierWave.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,27 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
Configure in `config/initializes/carrierwave.rb`
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
CarrierWave.configure do |conf|
|
27
|
+
conf.storage = :tencent_cos # set as default storage
|
28
|
+
conf.tencent_cos = {
|
29
|
+
secret_id: ENV['SECRET_ID_1'],
|
30
|
+
secret_key: ENV['SECRET_KEY_1'],
|
31
|
+
host: ENV['HOST_1'],
|
32
|
+
parent_path: '/app_name_1'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
You can also set the storage to `:tencent_cos` in the specified uploader:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
class PictureUploader < CarrierWave::Uploader::Base
|
41
|
+
storage :tencent_cos
|
42
|
+
end
|
43
|
+
```
|
26
44
|
|
27
45
|
## Development
|
28
46
|
|
@@ -41,3 +59,9 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
41
59
|
## Code of Conduct
|
42
60
|
|
43
61
|
Everyone interacting in the CarrierWave::TencentCos project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/xxjapp/carrierwave-tencent_cos/blob/master/CODE_OF_CONDUCT.md).
|
62
|
+
|
63
|
+
## Links
|
64
|
+
|
65
|
+
* [ruby gem carrierwave-tencent_cos](https://rubygems.org/gems/carrierwave-tencent_cos)
|
66
|
+
* [ruby gem tencent_cos_sdk](https://rubygems.org/gems/tencent_cos_sdk)
|
67
|
+
* [carrierwave](https://github.com/carrierwaveuploader/carrierwave)
|