Commit 34ae79c
committed
feat(serverHandler/upload): parse form file path manually
RFC 7578, Section 4.2 requires that if a filename is provided, the
directory path information must not be used.
Since Go 1.17, Part.FileName() will strip directory information.
The directory information is needed for uploading, parse manually
instead.1 parent 98270dd commit 34ae79c
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
61 | | - | |
| 74 | + | |
62 | 75 | | |
63 | 76 | | |
64 | 77 | | |
| |||
0 commit comments