Skip to content

Commit

Permalink
fix sftp upload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy201602 committed Apr 21, 2019
1 parent 508db27 commit e59f561
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions elfinder/sftpstoragedriver/sftpstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ def read(self, num_bytes=None):
def write(self, content):
if 'w' not in self._mode and 'a' not in self._mode:
raise AttributeError("File was opened for read-only access.")
if isinstance(content, str):
self.file = BytesIO(content.encode())
else:
self.file = BytesIO(bytes(content))
self.file = BytesIO(bytes(content))
self._is_dirty = True
self._is_read = True

Expand Down

0 comments on commit e59f561

Please sign in to comment.