Fixed upload method

This fixes the upload method so files can be uploaded to Sugar.