sehmaschine/django-filebrowser — Issue #64: Internet Explorer Failing on Upload
Author: emedchill
Created: 2011-12-19 18:37:51+00:00
State: open

I am using django-filebrowser 3.4.1 with django 1.3.1 and grappelli 2.3.6 that is using tinymce 3.4.2

Everytime I try to upload a file using filebrowser on Internet Explorer 9, 8, or 7 I get a message of "Failed" but the upload works fine (with the same file) on FireFox 8.0

FireFox call:
"POST /admin/filebrowser/upload_file/?csrf_token=e8d0b5d2e918188b66cfcfb0cebd9e79&csrf_name=csrfmiddlewaretoken&csrf_xname=X-CSRFToken&folder=&qqfile=001_05.png HTTP/1.1" 200 43

Internet Explorer call:
"POST /admin/filebrowser/upload_file/?csrf_token=682d458c6130355f60d38ff9382c03e9&csrf_name=csrfmiddlewaretoken&csrf_xname=X-CSRFToken&folder= HTTP/1.1" 500 88339

The 500 error that I get is:
Exception Value: 'NoneType' object has no attribute 'replace'
\..\ext\filebrowser\sites.py in _upload_file line 495

I did a 'print request.POST.get('file_name')' and got 'None' in the console when using IE

When I try to do a 'manage.py test filebrowser' I get this error:
======================================================================
FAIL: runTest (filebrowser.tests.sites.TestSite_filebrowser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "..\ext\filebrowser\tests\sites.py", line 232, in runTest
test_detail(self)
File "..\ext\filebrowser\tests\sites.py", line 139, in test_detail
test.assertTrue(test.site.storage.exists(path))
AssertionError: False is not true

----------------------------------------------------------------------

'print path' returns the correct path for three files:
tmp_test_0\testimage_large.jpg
tmp_test_0\testimage_admin_thumbnail.jpg
tmp_test_0\testimage_project_image.jpg

'print test.site.storage.exists(path)' returns:
True
True
False