通过以下链接的参考
https://github.com/nkranitz/transloadit-csharp-sdk 我使用 transloadit 进行视频转换并将其保存在 C# 中的 s3 中。我能够上传视频和图像,并且能够得到空结果的响应。我的回复是“ok”:“ASSEMBLY_EXECUTING”,消息和结果标签是空的。因此,一旦像 ASSEMBLY_COMPLETED 一样执行程序集,我就没有得到最终响应。所以,我看到有一些属性 assembly.setblocking = true .. 但在 C# 中该属性不可用。那么如何获得最终响应或如何在 c#.net 中使用阻塞属性
请帮我解决这个问题。
提前致谢。
下面是代码片段
ITransloadit transloadit = new Transloadit.Transloadit("APIKEY", "Secret");
//Create assembly builder to build up the assembly
IAssemblyBuilder assembly = new AssemblyBuilder();
//Add a file to be uploaded (with autogenerated key)
assembly.AddFile(@"filepath");
//Define the step, you can define more in the same assembly
IStep step = new Step();
step.SetOption("robot", "/image/resize");
step.SetOption("width", 75);
step.SetOption("height", 75);
step.SetOption("resize_strategy", "pad");
step.SetOption("background", "#000000");
//Add the step to the assembly
assembly.AddStep("thumb", step);
//Set notification URL
assembly.SetNotifyURL("url");
//Set the expiration date time of the request for the assembly
//Assembly will be expired in 120 minutes from now
assembly.SetAuthExpires(DateTime.Now.AddMinutes(120));
//Invoke assembly, and wait for the result
TransloaditResponse response = transloadit.InvokeAssembly(assembly);
if (response.Success)
{
// LoggerFactory.GetLogger().LogInfo(Type.GetType("TestConsole.Program"), "Assembly {0} result", response.Data);
}