activestorage-aliyun 0.4.0 → 0.4.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/CHANGELOG.md +4 -0
- data/lib/active_storage/service/aliyun_service.rb +5 -2
- data/lib/active_storage_aliyun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04e1265400dd3a5203a08928630037e34b75e1fb0e225c209228d7bb42330671
|
|
4
|
+
data.tar.gz: ae3ab3f2ddf9f71994ba5798b0f10f4130a2c6fd245fe50dba0c6a0bacb96fd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33d3f92832c8f21dc890eb682e0e949fe50efc7066f2320bdaf11a16b98fe42ca90aa0ac87bc37bec6d1f6a898c0bc8c5939ab1693425f7078f49c5d59e9d337
|
|
7
|
+
data.tar.gz: 6670c6fcace9bacc6cf806d32d2922e2a73c533a0ee1945fddff7815cc10be94d28bd50fcc2a29dcdc1bb267dfb6a1cd78d844f3be0ebdb9583349e8cce4f136
|
data/CHANGELOG.md
CHANGED
|
@@ -103,8 +103,11 @@ module ActiveStorage
|
|
|
103
103
|
attr_reader :config
|
|
104
104
|
|
|
105
105
|
def path_for(key)
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
root_path = config.fetch(:path, nil)
|
|
107
|
+
return key unless root_path
|
|
108
|
+
|
|
109
|
+
root_path = root_path.sub(/^\//, "")
|
|
110
|
+
File.join(root_path, key)
|
|
108
111
|
end
|
|
109
112
|
|
|
110
113
|
def object_url(key, sign:, expires_in: 60, params: {})
|