Skip to content

with s3 ajax uploder control not render in template #74

Open
@kartikdanidhariya

Description

@kartikdanidhariya

hi ,
i want to use your ajax uploader with s3 bucket on aws
first i installed ajaxuploder , boto
after i do
python manage.py collectstatic
all static file transfer to s3 bucket

after i define static variable in settings.py
AWS_UPLOAD_BUCKET_NAME = "bucket-to-upload-to"
AWS_UPLOAD_CLIENT_KEY = "public-aws-upload-key"
AWS_UPLOAD_CLIENT_SECRET_KEY = "secret-aws-upload-key"

then after i add url in my main url.py

url(r'^ajax-uploader/', include('ajaxuploader.urls', namespace='ajaxuploader', app_name='ajaxuploader')),

and then i add following code in template and "fine_uploader" div as well

<script>
var uploader = new qq.s3.FineUploader({
    element: document.getElementById('fine_uploader'),
    request: {
    endpoint: '{{ AWS_UPLOAD_BUCKET_NAME }}.s3.amazonaws.com',
    accessKey: {{ AWS_CLIENT_ACCESS_KEY }}
    },
    signature: {
    endpoint: '{% url "ajaxuploader:s3_signature" %}'
    },
    uploadSuccess: {
    endpoint: '{% url "ajaxuploader:s3_success" %}' 
    },
    iframeSupport: {
    localBlankPagePath: '/success.html'
    },
    deleteFile: {
    enabled: true,
    endpoint: '{% url "ajaxuploader:s3_delete" %}'
    },
});
</script>

but upload control not render in template
how can i get that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions