mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 19:08:04 +01:00
Add tentative prefix to crash report uploads
This commit is contained in:
@@ -46,6 +46,7 @@ export type UploadOptionsType = Readonly<{
|
||||
extension?: string;
|
||||
contentType?: string;
|
||||
compress?: boolean;
|
||||
prefix?: string;
|
||||
}>;
|
||||
|
||||
export const upload = async ({
|
||||
@@ -55,10 +56,17 @@ export const upload = async ({
|
||||
extension = 'gz',
|
||||
contentType = 'application/gzip',
|
||||
compress = true,
|
||||
prefix,
|
||||
}: UploadOptionsType): Promise<string> => {
|
||||
const headers = { 'User-Agent': getUserAgent(appVersion) };
|
||||
|
||||
const signedForm = await got.get(BASE_URL, {
|
||||
const formUrl = new URL(BASE_URL);
|
||||
|
||||
if (prefix !== undefined) {
|
||||
formUrl.searchParams.set('prefix', prefix);
|
||||
}
|
||||
|
||||
const signedForm = await got.get(formUrl.toString(), {
|
||||
responseType: 'json',
|
||||
headers,
|
||||
timeout: UPLOAD_TIMEOUT,
|
||||
|
||||
Reference in New Issue
Block a user