activestorage_qinium 0.4.2 → 0.4.4
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/Gemfile.lock +3 -3
- data/activestorage_qinium.gemspec +1 -1
- data/lib/active_storage/service/qinium_service.rb +5 -5
- data/lib/active_storage_qinium/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11e4097bab14c633fdccebdebb23fe9a824d859213f85b400b0bf2d64cc1b9fe
|
|
4
|
+
data.tar.gz: ebdad137029084eea7a149ce601a3340e6d0462ea267d407bc7f13adf026e432
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32682f579ecc55b9e778e6a8bfd0eabcb0d9b9eaf7abdcbc1b035d429aa4c1f63de6e4d75519ad0f94c0bcf0ad3fc06a7957af1d1b8f856b9f99f26ef81d9a39
|
|
7
|
+
data.tar.gz: 0afcb7b3b5e6de9bf9541be8f39cc3419781d9077b375dc5086f4ca682f878e83e1054605d785228938cb2ec3591a264c0230ccd6c1735257d3cca3a73f6e7f3
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
activestorage_qinium (0.4.
|
|
5
|
-
qinium (~> 0.
|
|
4
|
+
activestorage_qinium (0.4.4)
|
|
5
|
+
qinium (~> 0.5.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
@@ -89,7 +89,7 @@ GEM
|
|
|
89
89
|
ast (~> 2.4.1)
|
|
90
90
|
prism (1.9.0)
|
|
91
91
|
public_suffix (7.0.2)
|
|
92
|
-
qinium (0.
|
|
92
|
+
qinium (0.5.0)
|
|
93
93
|
racc (1.8.1)
|
|
94
94
|
rack (3.2.6)
|
|
95
95
|
rack-session (2.1.1)
|
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
|
|
28
28
|
spec.require_paths = ["lib"]
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "qinium", "~> 0.
|
|
30
|
+
spec.add_dependency "qinium", "~> 0.5.0"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "activestorage", ">= 6.1"
|
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
@@ -158,11 +158,11 @@ module ActiveStorage
|
|
|
158
158
|
# 文档:https://developer.qiniu.com/kodo/1659/download-setting
|
|
159
159
|
display_name = (options[:filename].presence || File.basename(key)).to_s
|
|
160
160
|
query_params << "attname=#{URI.encode_www_form_component(display_name)}"
|
|
161
|
-
cd = ActionDispatch::Http::ContentDisposition.format(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
)
|
|
165
|
-
query_params << "response-content-disposition=#{ERB::Util.url_encode(cd)}"
|
|
161
|
+
# cd = ActionDispatch::Http::ContentDisposition.format(
|
|
162
|
+
# disposition: "attachment",
|
|
163
|
+
# filename: ActiveStorage::Filename.new(display_name).sanitized
|
|
164
|
+
# )
|
|
165
|
+
# query_params << "response-content-disposition=#{ERB::Util.url_encode(cd)}"
|
|
166
166
|
# elsif disposition.to_s == "inline" # 预览(inline)
|
|
167
167
|
# # 明确设置 Content-Disposition 为 inline,确保浏览器预览而不是下载
|
|
168
168
|
# query_params << "response-content-disposition=inline"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activestorage_qinium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- xiaohui
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: qinium
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.5.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.
|
|
26
|
+
version: 0.5.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activestorage
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|