Commit 9c1524a
committed
sharing: Set appropriate filename of shared content.
Previously filename was the last element of sharedFileUrl.split('/') or
sharedImageUrl.split('/'). This did not always correspond to the actual
filename, sometimes this element did not contain a file extension making
the uploaded data to be stored as a binary file. This made shared images
fail to render and on downloading the shared content it was downloaded
as a binary file.
This commit uses ContentResolver to find the actual name of file being
shared and uses that to identify the shared file.1 parent 19e542c commit 9c1524a
File tree
3 files changed
+28
-1
lines changed- android/app/src/main/java/com/zulipmobile
- src
- sharing
3 files changed
+28
-1
lines changedLines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
97 | 120 | | |
98 | 121 | | |
99 | 122 | | |
| |||
109 | 132 | | |
110 | 133 | | |
111 | 134 | | |
| 135 | + | |
112 | 136 | | |
113 | 137 | | |
114 | 138 | | |
115 | 139 | | |
116 | 140 | | |
117 | 141 | | |
| 142 | + | |
118 | 143 | | |
119 | 144 | | |
120 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| 355 | + | |
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
| |||
0 commit comments