Save Media Files to Local Disk on Django-Storages

I’m using django-storages for storing my media files such us images, or document files to amazon S3. But if we using django-storages, by default all media files will uploaded to remote storage, in my case I’m using amazon S3.

I’m writing simple script to save both on remote and also local disk. To use this class, you just need to subclass this mixin class. Keep in mind to pay attention with mixin class order.

Currently only support save to local disk, but not supported yet to remove local file if the instance removed. Don’t hesitate to fork or improve my code. 😀

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s