Issue #4 resolved

FTPStorage: saving large files + more robust exists()

Wim Leers
created an issue

This patch has been created as part of my bachelor thesis [1] – as part of the daemon I wrote. I'm using django-storages to send files to FTP, Amazon S3 and Amazon CloudFront.

This patch is for FTPStorage and it does two things:

It enables the saving of large files by no longer reading all the chunks of the file in a single string, instead it uses ftplib.storbinary() directly with a file pointer, which then handles the writing in chunks automatically.

It makes exists() more reliable: it's been tested with 3 different FTP servers and so far it works without problems (PureFTPd, Xlight FTP Server 3.2 (used by and Pure-FTPd (used by

This greatly improves the number of use cases where you can use the FTPStorage custom storage system.


Comments (3)

  1. Log in to comment