Commit 066997d
fix(storage-r2): upload with the correct contentType (#13988)
### What?
Use the correct Content-Type when uploading files to R2.
### Why?
While R2 can infer the Content-Type of most uploads, in some scenarios
it will fail (e.g. when uploading an SVG image).
### How?
By passing the file's MIME type as the Content-Type header.
Bug report:
https://discord.com/channels/967097582721572934/1422639568808841329/1422645245534797914
Co-authored-by: Ricardo Tavares <rtavares@cloudflare.com>1 parent c819083 commit 066997d
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments