From 256a300297a754eae58dc05d3f44ff4e4211867a Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 2 Mar 2018 13:51:22 -0500 Subject: [PATCH] Integrate with logs service. --- Signal/src/util/Pastelog.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Signal/src/util/Pastelog.m b/Signal/src/util/Pastelog.m index a4f602907..f5322086a 100644 --- a/Signal/src/util/Pastelog.m +++ b/Signal/src/util/Pastelog.m @@ -115,9 +115,14 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error failWithError:OWSErrorWithCodeDescription(OWSErrorCodeDebugLogUploadFailed, @"Invalid response")]; return; } + + // Add a file extension to the upload's key. NSString *fileExtension = weakSelf.fileUrl.lastPathComponent.pathExtension; uploadKey = [uploadKey stringByAppendingPathExtension:fileExtension]; - [weakSelf uploadFileWithUploadUrl:uploadUrl fields:fields uploadKey:uploadKey]; + NSMutableDictionary *updatedFields = [fields mutableCopy]; + updatedFields[@"key"] = uploadKey; + + [weakSelf uploadFileWithUploadUrl:uploadUrl fields:updatedFields uploadKey:uploadKey]; } failure:^(NSURLSessionDataTask *_Nullable task, NSError *error) { DDLogError(@"%@ failed: %@", weakSelf.logTag, urlString);