Welcome Guest Search | Active Topics | Sign In | Register

Upload file - success Options
AiSatan
Posted: Tuesday, July 19, 2016 10:59:57 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2016
Posts: 35
How can I know that a file is uploaded to the server?
In a chrome browser displays file upload progress in the bottom left corner.
I need events about file upload success, can you help me?
eo_support
Posted: Tuesday, July 19, 2016 5:19:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

I do not think there is any interface for that. Sorry about it!

Thanks!
serializer
Posted: Wednesday, July 20, 2016 2:53:28 AM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
If there is no interface maybe you can detect the parent process that uses your component and detect if it is using the file? http://stackoverflow.com/questions/317071/how-do-i-find-out-which-process-is-locking-a-file-using-net

Then we can at least tell when the upload is completed? Not perfect but maybe a workaround?
AiSatan
Posted: Wednesday, July 20, 2016 4:16:55 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2016
Posts: 35
well, now I use this code for it, but maybe you can create more frendly event from the code:

Code: C#
internal void BeforeSendHeaders(object sender, RequestEventArgs args)
		{
			foreach (var postDataItem in args.Request.PostData)
			{
				if (postDataItem.Type != PostDataItemType.File)
				{
					continue;
				}
				Console.WriteLine("Start upload file {0}", postDataItem.FileName);
			}
		}

		internal void AfterReceiveHeadres(object sender, ResponseEventArgs args)
		{
			foreach (var postDataItem in args.Request.PostData)
			{
				if (postDataItem.Type == PostDataItemType.File)
				{
					Console.WriteLine("Finish upload file: {0}", postDataItem.FileName);
				}
			}
		}


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.