Seek to beginning of file before writing
Not seeking was providing files of 0 bytes. Not sure why this just recently started breaking.
This commit is contained in:
@@ -57,6 +57,7 @@ class RackspaceFileProvider(FileProviderInterface):
|
||||
object_name = uuid4().hex
|
||||
with NamedTemporaryFile() as tempfile:
|
||||
tempfile.write(fyle.stream.read())
|
||||
tempfile.seek(0)
|
||||
self.container.upload_object(
|
||||
file_path=tempfile.name,
|
||||
object_name=object_name,
|
||||
|
||||
Reference in New Issue
Block a user