Support uploading file from octet-stream

Change-Id: I11ad29059aea4aa5eb0ead906e04dd31f6b36bfb