I have written a program with which I can upload a file via drag and drop to an FTP. If the file has been uploaded and is free of errors, the software should generate a link.
For this I use an asynchronous upload and the method "UploadFileCompleted".
If I want to upload a large file, everything works fine except that the event does not trigger. With small Files everything works great.
EDIT: okay now 760MB File works , 800MB file does not work. the file is uploaded but the trigger does not fire.
using (WebClient client = new WebClient())
{
client.Credentials = Login;
client.UploadProgressChanged += (s, y) =>
{
progressBar.Value = y.ProgressPercentage *2;
};
client.UploadFileCompleted += WebClientUploadCompleted;
client.UploadFileAsync(new Uri(filePath), fileLink.FullName);
}
void WebClientUploadCompleted(object sender, UploadFileCompletedEventArgs e)
{
//this event does not fire if the file is to big
}
what can I do to trigger the event?