我正在尝试使用Telerik.Everlive.SDK库上传文件(“abc.jpg”),但我一直收到错误的网关错误。
这是我的代码:
var fileField = new Telerik.Everlive.Sdk.Core.Query.Definition.FormData.FileField("file","abc.jpg","image/jpeg", stream);
var result = EverliveAppContext.WorkWith().Files().Upload(fileField).ExecuteSync();
我在执行上面的代码时遇到异常:
Telerik.Everlive.Sdk.Core.Transport.EverliveException:\ r \ n \ n502 Bad Gateway \ r \ n \ r \ n
502 Bad Gateway
\ r \ n
nginx \ r \ n \ r \ n \ r \ n ---> System.Net.WebException:远程服务器返回错误:(502)Bad Gateway。\ n在System.Net的System.Net.HttpWebRequest.CheckFinalStatus(System.Net.WebAsyncResult result)[0x0033b]中:0 \ n。 HttpWebRequest.SetResponseData(System.Net.WebConnectionData data)[0x00165] in:0 \ n ---内部异常堆栈跟踪结束--- \ n在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()[0x0000b]中: 0 \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0004e] in:0 \ n在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务) )[0x0002e] in:0 \ n在System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x0000b] in:0 \ n at System.Runtime.CompilerServices.TaskAwaiter`1 [Telerik。 Everlive.Sdk.Core.Model.Result.CreateResultItem] .GetResult()[0x00000] in:0 \ n at Stream.Data.Repository + Files + d _1.MoveNext()[0x0008f] in e:\项目\ GIT \ StreamLive \共同\实体\ Repository.cs:218