I must upload some files from form to cloud server without redirecting there. So I have found this tutorial with php/ajax but a function that's not contained in django can be used there - move_submitted_file. How do i attain the same goes with django ? Presently I am using part of django-filetransfers, but after posting my make up the whole part after if request.method == Publish is overlooked :

def upload_handler(request):

    if request.method == 'POST':

        form = ArtifactSubmissionForm(request.Publish, request.FILES)

        if form.is_valid():


        return HttpResponseRedirect('/')


        upload_url, upload_data = prepare_upload(request, "uploadlink")

        form = ArtifactSubmissionForm()

    myfileid = create_myfileid()

    return direct_to_template(request, 'rte/artifact_inline.html',


and also the html:


<form action="" method="Publish" enctype="multipart/form-data">




        <input type="hidden" maxlength="64" title="myfileid" value="" >



        <input type="submit" value="Submit" />




I simply need to send files to server for more processing after which read their web addresses from servers response. Don't have to rely on them as File objects.

The django-storages plug-in has features that enables you to definitely instantly store submitted content towards the repository of your liking. We have an annoying have to be associated with your MEDIA_URL, but that is just code and you will deal with it.

Source code are available here: Django storages.

I suggest rooting round the network for just one that you want. If you are using Amazon . com Cloudfront, when i do inside my present position, using one which disabls HTTPS over signed Web addresses saved us a couple of millicents per download, which does accumulate with time.