我终于用下面的代码重现了这个问题。 我只是使用blob触发器来触发持久函数,并且在其中一个活动函数中读取blob。但是...当我读取blob时,我收到一个错误,该blob不存在。
有人可以在这里解释我在做什么错吗?
代码:
[FunctionName("BlobTrigger")]
public static async void Trigger(
[BlobTrigger("incoming-blob/{filename}", Connection = "")]Stream myBlob,
[OrchestrationClient]DurableOrchestrationClient starter,
string filename,
ILogger log)
{
var instanceId = await starter.StartNewAsync("Orchestrator", filename);
}
[FunctionName("Orchestrator")]
public static async Task RunOrchestrator(
[OrchestrationTrigger] DurableOrchestrationContext context)
{
var filename = context.GetInput<string>();
await context.CallActivityAsync("Read_Blob", filename);
}
[FunctionName("Read_Blob")]
public static async Task Activity(
[ActivityTrigger] string filename,
[Blob("incoming-blob")] CloudBlobContainer container,
ILogger log)
{
var stream = new MemoryStream();
var blob = container.GetBlockBlobReference(filename);
await blob.DownloadToStreamAsync(stream);
//EXCEPTION THROWN AT ABOVE LINE.
stream.Dispose();
}
答案 0 :(得分:0)
好像您正在使用传入的参数 String getVideoID(String url) {
url = url.replaceAll("https://www.youtube.com/watch?v=", "");
url = url.replaceAll("https://m.youtube.com/watch?v=", "");
return url;
}
来尝试flutter emulator -- launch <emulator id
而不是container.GetBlockBlobReference("filename")