# Path: buckets/test/errors.py
# EXCEED_MAX_SIZE = """
#     <Error>
#         <Code>EntityTooLarge</Code>
#         <Message>Your proposed upload exceeds the maximum
#                  allowed size</Message>
#         <MaxSizeAllowed>{max_size}</MaxSizeAllowed>
#         <ProposedSize>{proposed_size}</ProposedSize>
#     </Error>
# """


from django.conf import settings
from django.core.files.storage import default_storage
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from django.http import HttpResponse
from .errors import EXCEED_MAX_SIZE



@csrf_exempt
@require_POST
def fake_s3_upload(request):

# Path: buckets/test/errors.py
# EXCEED_MAX_SIZE = """
#     <Error>
#         <Code>EntityTooLarge</Code>
#         <Message>Your proposed upload exceeds the maximum
#                  allowed size</Message>
#         <MaxSizeAllowed>{max_size}</MaxSizeAllowed>
#         <ProposedSize>{proposed_size}</ProposedSize>
#     </Error>
# """


# Path: buckets/test/views.py
from django.conf import settings
from django.core.files.storage import default_storage
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from django.http import HttpResponse
from .errors import EXCEED_MAX_SIZE




@csrf_exempt
@require_POST
def fake_s3_upload(request):

    key = request.POST.get('key')