Commit f59a32a
Fix direct upload: use MD5-base64 checksum and check PUT response
ActiveStorage (disk + S3) expects MD5-base64 checksums:
- Disk service: ensure_integrity_of computes Digest::MD5.base64digest
- S3/MinIO: presigned URL enforces content_md5 header
Switching from SHA-256 hex to MD5 base64 fixes the integrity check.
Also throw on non-2xx PUT responses so upload failures aren't silently
swallowed before the PATCH confirmation is sent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 098bb2c commit f59a32a
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | | - | |
| 215 | + | |
213 | 216 | | |
214 | | - | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | | - | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| |||
0 commit comments