enable string based media upload

allow to upload media from a string instead of a file
This doesn't seem right, the call to return self.uploadstream() should be done right after f.close().