Avoid sending request when no file was selected

When the user pressed ESC in the file selection dialog, the request is incorrectly issued.

If both #7 and this one are accepted, then this should go after having called onBegin in order to allow to clear upload indications in the UI.