Possible fix for occasional corrupt files pushed to nexus

The promise was being returned after the file stream was read, not when the file was finished being piped to the URL.
This could result in the file not being completely transferred before the task ends.