我正在使用FileBrowser上传图像文件。在我的settings.py中我设置了
from filebrowser.sites import site
site.storage.location = SITE_ROOT + "/static/memes_images/"filebrowser会将文件正确上传到此目录。但问题出在文件浏览器文件列表中的图像缩略图。缩略图不会显示,因为它尝试从链接http://localhost:8000/admin/filebrowser/browse/name.jpg显示缩略图。正确的链接是http://localhost:8000/static/memes_images/name.jpg。我尝试在settings.py中设置它
site.storage.url = "http://localhost:8000/static/memes_images"但当我设置它时,FileBrowser使用空字符串作为图像url,而不是此http://localhost:8000/static/memes_images/name.jpg。
如何更改FileBrowser使用的图像url?
发布于 2016-05-27 04:17:34
我也有同样的问题。但是设置MEDIA_ROOT和MEDIA_URL会有所帮助。
https://stackoverflow.com/questions/35310630
复制相似问题