aliyunoss-activestorage-adapter 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7757febf237bc442aba6646fabf093c891422b5252f343c8d6d90cfe6c4fc1f
4
- data.tar.gz: a25d1df2f441e883795119f9961df5d6ba004ebaa4ac1782840d41a7ad5fe2ce
3
+ metadata.gz: 0b4c5915f74e002753e244506301383d21c6ab835dcd884db7965220afd9eddb
4
+ data.tar.gz: fff46b4ccaf3189b2affe15b0490d5411d32f1af7626fc50f32a9843d88be129
5
5
  SHA512:
6
- metadata.gz: 7d6a9976e6133bd972088b730b19e15aa5330fdad96dbae6a60159d76315e2d8c5377b593f11380862f6e324f1254dae28113c554a3bbf1a675482024dc8ed56
7
- data.tar.gz: 3b720d6374c8eef6dd35c0b8dc34d3d5b576a9f011796ce4c6aa434e73792494a2b6f60a683d0a1db62029001cd0b763a7d2ea492e1d79e162965aafbd50aa4a
6
+ metadata.gz: e3328982b6677f7a9b76cdf9c7bd572fe8ad421d16dc54bc6c06c01a4a344aa907ec6db96e6633889bd3223f01a583e7d362910663162b6566d953c4a2893ca9
7
+ data.tar.gz: 5abfebad239c4f334022283f3f97b3b4474a126fd9b3995a1ef5ec04db8f3b85094f48245e1e4c84e8e9ac567980ed11df5b578db7f2d785807321bdd2cbe003
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aliyunoss-activestorage-adapter (0.1.1)
4
+ aliyunoss-activestorage-adapter (0.1.2)
5
5
  aliyunoss (~> 0.2)
6
6
 
7
7
  GEM
@@ -40,7 +40,7 @@ GEM
40
40
  i18n (>= 1.6, < 2)
41
41
  minitest (>= 5.1)
42
42
  tzinfo (~> 2.0)
43
- aliyunoss (0.2.2)
43
+ aliyunoss (0.2.3)
44
44
  nokogiri (~> 1.13)
45
45
  ast (2.4.2)
46
46
  builder (3.2.4)
@@ -104,12 +104,13 @@ module ActiveStorage
104
104
  # You must also provide the +content_type+, +content_length+, and +checksum+ of the file
105
105
  # that will be uploaded. All these attributes will be validated by the service upon upload.
106
106
  def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
107
- raise NotImplementedError
107
+ public_url(key)
108
108
  end
109
109
 
110
110
  # Returns a Hash of headers for +url_for_direct_upload+ requests.
111
111
  def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: {})
112
- {}
112
+ @bucket.direct_upload_headers(path_for(key), filename:,
113
+ content_type:, content_length:, checksum:, custom_metadata: {})
113
114
  end
114
115
 
115
116
  def public?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveStorage
4
4
  module AliyunossService
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aliyunoss-activestorage-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yiiecc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-18 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aliyunoss