在此发布此消息是因为Xamarin的支持告诉我。我希望有一些来自xamarin的人可以回复我。
上传ios符号文件的构建任务在尝试上传dsym包时报告此消息:
这是暂时的问题吗?
最近我们在ios解决方案中添加了大量图像以支持所有分辨率,因此dsym软件包现在只需52 MB,而不是22 MB。这是一个问题还是仅仅是目前存储空间不足的后端?
我还必须更改上传实现,以解决运行到超时异常的原始实现:
using (var client = new WebClient())
{
client.Headers.Add(HttpRequestHeader.ContentType, "application/zip"); ;
this.WriteLogMessage(" Uploading file to Xamarin.Insights API ...");
var response = client.UploadFile(new Uri($"https://xaapi.xamarin.com/api/dsym?apikey={InsightsApiKey}", UriKind.Absolute), tmpFileName);
this.WriteLogMessage($" Response: {Encoding.ASCII.GetString(response)}");
this.WriteLogMessage(" Done.");
}
转入
using (var httpClient = new HttpClient())
using (var fileStream = new FileStream(tmpFileName, FileMode.Open))
using (var streamContent = new StreamContent(fileStream))
{
httpClient.Timeout = TimeSpan.FromSeconds(this.UploadTimeoutLimitInSeconds);
this.WriteLogMessage($" Uploading file to Xamarin.Insights API (Timeout {httpClient.Timeout.TotalSeconds}s) ...");
string responseText;
using (MultipartFormDataContent form = new MultipartFormDataContent())
{
var allBytes = await streamContent.ReadAsByteArrayAsync();
form.Add(new ByteArrayContent(allBytes, 0, allBytes.Length), "symbol", Path.GetFileName(tmpFileName));
var requestUri = new Uri($"https://xaapi.xamarin.com/api/dsym?apikey={InsightsApiKey}", UriKind.Absolute);
using (var response = await httpClient.PostAsync(requestUri, form))
{
responseText = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
this.WriteLogMessage($" Error: {response.ReasonPhrase}");
}
else
{
this.WriteLogMessage($" Response: {responseText}");
}
this.WriteLogMessage(" Done.");
return response.IsSuccessStatusCode;
}
}
}
以防必须对要更改的代码执行任何操作。