I have a functionality of does the following:
The problem:
It puts the link and shows the player, but as the video has not yet uploaded 100% nothing appears in the player. After a few seconds, pressing play will start without any problems.
I keep the video like this:
private void UploadWholeFile(HttpContext context, List<FilesStatus> statuses,
string pre_hash = "")
{
for (int i = 0; i < context.Request.Files.Count; i++)
{
var file = context.Request.Files[i];
var fullPath = StorageRoot + pre_hash + Path.GetFileName(file.FileName);
file.SaveAs(fullPath); // <---- GUARDO AQUI <---------------
string fullName = Path.GetFileName(file.FileName);
statuses.Add(new FilesStatus(pre_hash + fullName, file.ContentLength,
fullPath));
}
}
How can I tell when the file has been loaded (this function saves N different files, in the context of this problem there is always only one item for the loop)?