Hi,
in addition to Shahins solution it seems there's a method to check internet connection when P/Invoking wininet.dll.
[DllImport("wininet.dll", SetLastError = true)]
static extern bool InternetCheckConnection(string lpszUrl, int dwFlags, int dwReserved);
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384346%28v=vs.85%29.aspx[
^]
Easy to try, maybe it's working for you.
A second idea
could be to check if user has started his browser. Something like if Process Firefox or ie is executed, or a process you pretty surly know that's executed on connection (maybe proof as a windows service), begin your uploading.
A third idea could be using a method that matches your requirements from the wifi wlanapi.dll.
Regards