Small fixes to bugs in the streaming handler for use with magic and radosgw.
This commit is contained in:
parent
d2d51d15a2
commit
c9e1648781
4 changed files with 25 additions and 13 deletions
|
@ -1,5 +1,7 @@
|
|||
import os
|
||||
import shutil
|
||||
import hashlib
|
||||
import io
|
||||
|
||||
from storage.basestorage import BaseStorage
|
||||
|
||||
|
@ -39,7 +41,7 @@ class LocalStorage(BaseStorage):
|
|||
|
||||
def stream_read_file(self, path):
|
||||
path = self._init_path(path)
|
||||
return open(path, mode='rb')
|
||||
return io.open(path, mode='rb')
|
||||
|
||||
def stream_write(self, path, fp, content_type=None):
|
||||
# Size is mandatory
|
||||
|
|
Reference in a new issue