Commit 5a861df
refactor(storage): replace explicit upload/update variants with UploadMethod enum
Remove uploadMultipart, uploadResumable, updateMultipart, updateResumable and
consolidate into a method: UploadMethod parameter on upload() and update().
UploadMethod has three cases:
- .auto (default) — picks multipart for ≤6 MB, TUS for larger
- .multipart — always use a single multipart HTTP request
- .resumable — always use the TUS resumable protocol
update() now delegates to upload() internally, eliminating duplicated logic.
The private HTTP helper is renamed from uploadMultipart to _performMultipartRequest
to avoid confusion with the public API.
Updates docs, tests, and the FileUploadView example (adds method picker).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e0a9528 commit 5a861df
8 files changed
Lines changed: 156 additions & 351 deletions
File tree
- Examples/Examples/Storage
- Sources/Storage
- Tests
- IntegrationTests
- StorageTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
197 | 204 | | |
198 | 205 | | |
199 | 206 | | |
200 | | - | |
| 207 | + | |
201 | 208 | | |
202 | 209 | | |
203 | 210 | | |
| |||
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
238 | | - | |
| 245 | + | |
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
| |||
277 | 284 | | |
278 | 285 | | |
279 | 286 | | |
280 | | - | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
0 commit comments