Commits

Mathieu Comandon committed 585f1fc Draft

raise chunk size

  • Participants
  • Parent commits 0c7700a

Comments (0)

Files changed (1)

File storages/backends/ftp.py

             self._connection.cwd(os.path.dirname(name))
             self._connection.storbinary('STOR ' + os.path.basename(name),
                                         content.file,
-                                        content.DEFAULT_CHUNK_SIZE)
+                                        content.DEFAULT_CHUNK_SIZE * 100)
             self._connection.cwd(pwd)
-        except ftplib.all_errors:
-            raise FTPStorageException('Error writing file %s' % name)
+        except ftplib.all_errors, e:
+            raise FTPStorageException('Error writing file %s: %s' % (name, e))
 
     def _open(self, name, mode='rb'):
         remote_file = FTPStorageFile(name, self, mode=mode)