Open offbrok opened 2 years ago
Framework: sanic Is there any way to get the name and type of the uploaded file? We are currently using this implementation:
for _, file_list in info.context.req.files.items(): file_name = file_list[0].name file_size = len(file_list[0].body) file_type = file_list[0].type
Is there a more correct way to get this data using the Upload scalar?
@offbrok yes, unfortunately the current implementation of Upload returns a BytesIO object for Sanic:
we might want to change that
Framework: sanic Is there any way to get the name and type of the uploaded file? We are currently using this implementation:
Is there a more correct way to get this data using the Upload scalar?
Upvote & Fund