2

I am trying to use django-filebrowser. I have installed in correctly according to the instructions, but i get a JS error every time i try to upload a file.

I should note that i am able to browse to 'filebrowser/browse/', create directories etc. The problem is that when i chose to upload a file, i can see in the html source that a file 'CollapsedFieldsets.js' is included but cannot be found.

The location of this file is supposed to be here: django-install/django/contrib/admin/media/js/admin/ but the file is nowhere to be found.

django-filebrowser references this JS file in filebrowser/templates/upload.html

The error i get is:

invalid object initializer
$('#id_file').uploadify({ 

That probably happens because the file in question cannot be found. I am using Django 1.3 and that file is not included in the download.

Please help!

madth3
  • 7,275
  • 12
  • 50
  • 74
Dim
  • 815
  • 2
  • 7
  • 12

1 Answers1

0

I may have got the same trouble some days ago when I was using django-filebrowser. I can also create the directory, but when I click the 'browse' button, it fails with the same error that you got: 'CollapsedFieldsets.js' can not be found.

at last, I found that:

MEDIA_URL = 'http://domain/static/'
FILEBROWSER_URL_FILEBROWSER_MEDIA =MEDIA_URL+ 'filebrowser/'

because the MEDIA_URL has no 'www', so when I visit my website with no 'www', the filebrowser works well; but if with 'www', I will still get the error.

I am not sure this answer is right, hope it can help you.

jhonkola
  • 3,385
  • 1
  • 17
  • 32