Closed
Description
continuing with #26, explicit seeking at 0 on the file stream could help avoid #37.
def get_params(self, **keywords):
extension = self.name.split(".")[-1]
keywords['file_type'] = extension
self.file.seek(0) # <--
content = self.file.read()
if content:
keywords['file_content'] = content
else:
raise IOError("No content was uploaded.")
return keywords
Activity
test #39, stringio has been read() can be read() again by seeking at 0