active_storage_base64 3.0.0 → 3.0.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.
Potentially problematic release.
This version of active_storage_base64 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/lib/active_storage_support/base64_attach.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba862394e004f3be34936eaa4154ea21f9dbe686101908b0aa97162cb758379
|
4
|
+
data.tar.gz: d03b6679e2f357ae0d68923854ae1345a076b20af5e7486a435ebc3caebcfe8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bbaf2b02e0b06f309a3a07700892a70ae115547c027d3bee9b5671650791a71e32014e1c4373a5d307c399e05d9285e31b01bfe1d1b19d065008681f6168e67
|
7
|
+
data.tar.gz: b04bde090fe974256791d4dedb282629ea0758dac12897b01f719df9e91c9e732c65288d802bcb193d2aa361f9717583176cc41a44dbc248e50513bfdd632edc
|
data/README.md
CHANGED
@@ -16,6 +16,9 @@ gem 'active_storage_base64'
|
|
16
16
|
## Compatibility
|
17
17
|
Rails Version | ActiveStorageBase64 Version
|
18
18
|
--------------|-----------------------------
|
19
|
+
8.1.x | 3.0.x
|
20
|
+
8.0.x | 3.0.x
|
21
|
+
7.2.x | 3.0.x
|
19
22
|
7.1.x | 3.0.x
|
20
23
|
7.0.x | 2.0.x
|
21
24
|
6.1.x | 1.2.x
|
@@ -178,6 +181,16 @@ For example:
|
|
178
181
|
data:image/png;base64,[base64 data]
|
179
182
|
```
|
180
183
|
|
184
|
+
### Avoid bloating logs
|
185
|
+
|
186
|
+
Because we use strings to pass data in params, if you are not careful, these long strings will show up in your production logs, causing a lot of bloat. To avoid this, filter your base64 params:
|
187
|
+
```diff
|
188
|
+
# config/initializers/filter_parameter_logging.rb
|
189
|
+
|
190
|
+
- Rails.application.config.filter_parameters += [:password]
|
191
|
+
+ Rails.application.config.filter_parameters += [:password, :avatar, :pictures, :file]
|
192
|
+
```
|
193
|
+
|
181
194
|
## Contributing
|
182
195
|
|
183
196
|
Please read our [CONTRIBUTING](https://github.com/rootstrap/active-storage-base64/blob/master/CONTRIBUTING.md) and our [CODE_OF_CONDUCT](https://github.com/rootstrap/active-storage-base64/blob/master/CODE_OF_CONDUCT.md) files for details on our code of conduct, and the process for submitting pull requests to us.
|
@@ -19,7 +19,7 @@ module ActiveStorageSupport
|
|
19
19
|
return unless base64_data.try(:is_a?, String) && base64_data.strip.start_with?('data')
|
20
20
|
|
21
21
|
headers, data = base64_data.split(',')
|
22
|
-
decoded_data = Base64.decode64(data)
|
22
|
+
decoded_data = Base64.decode64(data || '')
|
23
23
|
|
24
24
|
attachment[:io] = StringIO.new(decoded_data)
|
25
25
|
attachment[:content_type] ||= content_type(headers)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_storage_base64
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Cortio
|
8
8
|
- Santiago Bartesaghi
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activestorage
|
@@ -127,16 +127,16 @@ dependencies:
|
|
127
127
|
name: sqlite3
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
139
|
+
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: image_processing
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,7 +170,7 @@ homepage: https://github.com/rootstrap/active-storage-base64
|
|
170
170
|
licenses:
|
171
171
|
- MIT
|
172
172
|
metadata: {}
|
173
|
-
post_install_message:
|
173
|
+
post_install_message:
|
174
174
|
rdoc_options: []
|
175
175
|
require_paths:
|
176
176
|
- lib
|
@@ -185,8 +185,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
|
-
rubygems_version: 3.
|
189
|
-
signing_key:
|
188
|
+
rubygems_version: 3.0.3.1
|
189
|
+
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Base64 support for ActiveStorage
|
192
192
|
test_files: []
|