local file upload SSL fix

The file data upload would sometimes start before data was ready,
wait for SSL before we start