upload: Fixing -F parsing

The code was incorrect leading to a failure at runtime.