Commit 46546f3
authored
fix: update file upload to use RC 8.x rooms.media API (#1070)
* fix: update file upload to use RC 8.x rooms.media API
- Replace deprecated rooms.upload endpoint with new two-step process
- Step 1: POST to rooms.media/:rid to upload file
- Step 2: POST to rooms.mediaConfirm/:rid/:fileId to confirm with metadata
- Fixes file upload 404 error on Rocket.Chat 8.x servers
* fix: reset file input after upload to allow re-selecting same file
* style: fix prettier formatting
* fix: resolve variable shadowing in ChatInput.js
* Remove comments
* Remove comments
---------
Co-authored-by: dodaa08 <dodaa08@users.noreply.github.com>1 parent 2ccf190 commit 46546f3
File tree
2 files changed
+52
-18
lines changed- packages
- api/src
- react/src/views/ChatInput
2 files changed
+52
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1056 | 1056 | | |
1057 | 1057 | | |
1058 | 1058 | | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1062 | 1062 | | |
| 1063 | + | |
| 1064 | + | |
1063 | 1065 | | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1067 | 1077 | | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1077 | 1104 | | |
1078 | | - | |
| 1105 | + | |
1079 | 1106 | | |
1080 | 1107 | | |
1081 | 1108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
0 commit comments