Compress uploaded rageshakes. (#3647)
This commit is contained in:
parent
66a473863a
commit
ccc33db9dd
2 changed files with 6 additions and 1 deletions
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import pako from 'pako';
|
||||
import q from "q";
|
||||
|
||||
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
|
||||
|
@ -78,7 +79,10 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
|||
// encode as UTF-8
|
||||
const buf = new TextEncoder().encode(entry.lines);
|
||||
|
||||
body.append('log', new Blob([buf]), entry.id);
|
||||
// compress
|
||||
const compressed = pako.gzip(buf);
|
||||
|
||||
body.append('compressed-log', new Blob([compressed]), entry.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue