| Page 1 of 1 | [ 3 posts ] |
|
Through some Googling, I had seen others have not been been to make YUI Uploader play nice with Django's CSRF protection. This may be a self-evident solution, but I thought I'd post in anyway given 1: it works, 2: past troubles with Django CSRF and YUI Uploader. I tested it when YUI Uploader executed via html5 or flash.
For the example on this page: Multiple Files Upload with Transparent Overlay Button http://yuilibrary.com/yui/docs/uploader/uploader-multiple.html only two lines of code need to be added, and one change made new lines: var csrf_value = Y.Cookie.get("csrftoken"); postVarsPerFile: {'csrfmiddlewaretoken': csrf_value} change to seed line (cookie added): YUI({filter:"raw"}).use("uploader", "cookie", function(Y) { this is all saved on a github gist: https://gist.github.com/2696607 |
|
Thanks Adam! This should be added to the Uploader landing page as an example for others.
|
Allen RabinovichYUI Developer
|
Hi Adam,
Thanks for suggesting this. The ticket tracking this issue is here: http://yuilibrary.com/projects/yui3/ticket/2532313 |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group