mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-10 04:06:14 +00:00
Fix data import with S3 storage backend (#12973)
* Fix data import with S3 storage backend Fixes #11117 * Fix formatting * fix formatting --------- Co-authored-by: mg <mg@layerx-defence.com> Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
1 file changed
+3
-1
@@ -33,7 +33,9 @@ def load_data_file(data_file, file_format=None):
|
|||||||
file_object = data_file.file
|
file_object = data_file.file
|
||||||
|
|
||||||
if hasattr(file_object, 'open'):
|
if hasattr(file_object, 'open'):
|
||||||
file_object.open('r')
|
file_object.open(
|
||||||
|
'rb'
|
||||||
|
) # opens the file in binary mode so other storage backends work
|
||||||
|
|
||||||
file_object.seek(0)
|
file_object.seek(0)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user