Fix resource upload using octet-stream
Add a test for resource upload using the octet-stream content-type