tstone/django-uploadify — Issue #9: request.user and more
Author: ouhouhsami
Created: 2011-10-17 15:44:09+00:00
State: open

Hello,

Thanks for this app. I'd like to have one more feature: you have got this upload method

def upload(request, *args, **kwargs):
print request.user # <= here what I wan't
if request.method == 'POST':
if request.FILES:
upload_received.send(sender='uploadify', data=request.FILES['Filedata'])
return HttpResponse('True')

But, when I try to access, for instance request.user, inside this method (method that I duplicated to do this, adding extra @csrf_exempt ...) I always get an 'AnonymousUser' even if I'm logged in because, the request, using Ajax, doesn't 'copy()' the original request.POST used in my view, where I display the uploadify widget.

Is there a way to solve this problem ?

Thx