Compress uploaded rageshakes. (#3647)
parent
66a473863a
commit
ccc33db9dd
|
@ -65,6 +65,7 @@
|
|||
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "matrix-org/matrix-react-sdk#develop",
|
||||
"modernizr": "^3.1.0",
|
||||
"pako": "^1.0.5",
|
||||
"q": "^1.4.1",
|
||||
"react": "^15.4.0",
|
||||
"react-dnd": "^2.1.4",
|
||||
|
|
|
@ -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…
Reference in New Issue