Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"CSRF verification failed" when attempting to upload a file or create a folder with filebrowser for Django

I have installed filebrowser for Django (not filebrowser3) and when I try to upload a file I recieve the following error:

403 Forbidden

CSRF verification failed. Request aborted.

More information is available with DEBUG=True.

The same error occurs when I try to create a new folder which shows that the problem is that filebrowser cannot create files/direcories within my uploads directory. I am using the default settings and have manually created the /media/uploads directory with it's permissions set as 755.

If I upload a file to the directory then file-browser admin page states:

1 Item Folder: 0 Image: 1

I cannot view the image that I have uploaded.

I have the PIL and sorl.thumbnail modules installed.

like image 768
Peter Horne Avatar asked Nov 11 '09 21:11

Peter Horne


1 Answers

You are probably using the development version of Django, which includes quite a lot of extra CRSF security. However it's not released yet so external products probably aren't compatible. You should use the 1.1 version of Django instead.

like image 195
Daniel Roseman Avatar answered Oct 13 '22 04:10

Daniel Roseman