I am trying send a file object of type BytesIO from flask API to angular frontend.
I am using json.dumps(). File object shouldn't be stored on file system. I am using memory for storing file object. Using io.BytesIO().
return json.dumps({'UserId': username, 'file': file_object}), 201
Typerror: <_io.BytesIO object> is not json searializable