def upload_from_fileobject(f, profile=None, label=None):
if profile is None:<EOL><INDENT>profile = '<STR_LIT:default>'<EOL><DEDENT>conf = get_profile_configs(profile)<EOL>f.seek(<NUM_LIT:0>)<EOL>if not is_image(f, types=conf['<STR_LIT>']):<EOL><INDENT>msg = (('<STR_LIT>'<EOL>'<STR_LIT>') %<EOL>{'<STR_LIT>': '<STR_LIT:U+002CU+0020>'.join(map(lambda t: t.upper(), conf['<STR_LIT>']))})<EOL>raise RuntimeError(msg)<EOL><DEDENT>return _custom_upload(f, profile, label, conf)<EOL>
Saves image from f with TMP prefix and returns img_id.