0
這是來自settings.py。我可以上傳文件,瀏覽文件名。無法使用django-filebrowser下載文件
# Main Media Settings
MEDIA_ROOT = getattr(settings, "FILEBROWSER_MEDIA_ROOT", 'media')
MEDIA_URL = getattr(settings, "FILEBROWSER_MEDIA_URL", settings.MEDIA_URL)
# Main FileBrowser Directory. This has to be a directory within MEDIA_ROOT.
# Leave empty in order to browse all files under MEDIA_ROOT.
# DO NOT USE A SLASH AT THE BEGINNING, DO NOT FORGET THE TRAILING SLASH AT THE END.
DIRECTORY = getattr(settings, "FILEBROWSER_DIRECTORY", 'uploads/')
在瀏覽網頁,我看到這些文件都是這種格式:
網址上傳/ example.xlsx
作品尺寸39.3 KB
但是當我點擊URL鏈接,我被引導到
8000/admin/filebrowser/detail/uploads/example.xlsx
這樣的抱怨:
使用在MIO_Risk.urls定義,Django的嘗試這些URL模式的URL配置,順序如下:
^__debug__/
^admin/filebrowser/ ^browse/$ [name='fb_browse']
^admin/filebrowser/ ^createdir/ [name='fb_createdir']
^admin/filebrowser/ ^upload/ [name='fb_upload']
^admin/filebrowser/ ^delete_confirm/$ [name='fb_delete_confirm']
^admin/filebrowser/ ^delete/$ [name='fb_delete']
^admin/filebrowser/ ^detail/$ [name='fb_detail']
^admin/filebrowser/ ^version/$ [name='fb_version']
^admin/filebrowser/ ^upload_file/$ [name='fb_do_upload']
任何想法,這應該是如何工作的?還是應該工作呢?由於