From 92972735f70d0e5cc8a9dfb2a1ab3b4e5f20c8a8 Mon Sep 17 00:00:00 2001 From: Josh Schneier Date: Sat, 11 Aug 2018 20:01:42 -0400 Subject: [PATCH] Fixed #542 -- Document AWS_S3_MAX_MEMORY_SIZE --- docs/backends/amazon-S3.rst | 4 ++++ storages/backends/s3boto.py | 3 --- storages/backends/s3boto3.py | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/backends/amazon-S3.rst b/docs/backends/amazon-S3.rst index 386db8615..7eaecda20 100644 --- a/docs/backends/amazon-S3.rst +++ b/docs/backends/amazon-S3.rst @@ -72,6 +72,10 @@ Available are numerous settings. It should be especially noted the following: authentication from generated URLs. This can be useful if your S3 buckets are public. +``AWS_S3_MAX_MEMORY_SIZE`` (optional; default is ``0`` - do not roll over) + The maximum amount of memory a file can take up before being rolled over + into a temporary file on disk. + ``AWS_QUERYSTRING_EXPIRE`` (optional; default is 3600 seconds) The number of seconds that a generated URL is valid for. diff --git a/storages/backends/s3boto.py b/storages/backends/s3boto.py index 843bff823..37734a278 100644 --- a/storages/backends/s3boto.py +++ b/storages/backends/s3boto.py @@ -217,9 +217,6 @@ class S3BotoStorage(Storage): port = setting('AWS_S3_PORT') proxy = setting('AWS_S3_PROXY_HOST') proxy_port = setting('AWS_S3_PROXY_PORT') - - # The max amount of memory a returned file can take up before being - # rolled over into a temporary file on disk. Default is 0: Do not roll over. max_memory_size = setting('AWS_S3_MAX_MEMORY_SIZE', 0) def __init__(self, acl=None, bucket=None, **settings): diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py index 1547dc888..28de7d814 100644 --- a/storages/backends/s3boto3.py +++ b/storages/backends/s3boto3.py @@ -222,9 +222,6 @@ class S3Boto3Storage(Storage): endpoint_url = setting('AWS_S3_ENDPOINT_URL') region_name = setting('AWS_S3_REGION_NAME') use_ssl = setting('AWS_S3_USE_SSL', True) - - # The max amount of memory a returned file can take up before being - # rolled over into a temporary file on disk. Default is 0: Do not roll over. max_memory_size = setting('AWS_S3_MAX_MEMORY_SIZE', 0) def __init__(self, acl=None, bucket=None, **settings):