django filebrowser不允许创建文件夹并且不上传文件
我正在尝试将 django-filebrowser 实现到我最新的应用程序中。我也安装了grapelli。网址可以很好地进入 filebrowser /admin/filebrowser/browse 是我设置的。
我遇到的问题是在尝试添加文件夹或上传文件时。
新文件夹:
当我添加文件夹时,会抛出错误,指出:
请更正以下错误。
权限被拒绝。
现在该文件夹的权限就很好了。我不明白为什么它不允许我在这里上传文件。
drwxr-xr-x 2 naytive naytive 4096 Jan 18 08:32 上传/
上传文件:
通常,上传文件时,文件浏览器上传屏幕会出现一个计时器,表示上传成功,但是当我尝试上传时一个文件,它只是刷新以 url 结尾的页面
?_save=上传
已经到了我将删除该模块的地步,因为它没有按照设置的方式运行。
有什么想法吗?
编辑:我认为上传文件方面也是由原始文件权限引起的。如果我们修复此错误,那么上传也许也能正常工作。
I'm trying to implement django-filebrowser into my latest app. I have grappelli installed also. The urls work fine for getting into filebrowser /admin/filebrowser/browse is what I have it set at.
The problem I am having is when it comes to trying to either add a folder or upload a file.
New Folder:
When I'm adding a folder an error is thrown stating:
Please correct the following errors.
Permission denied.
Now the permissions for the folder are fine. I don't understand why it won't allow me to upload files here.
drwxr-xr-x 2 naytive naytive 4096 Jan 18 08:32 uploads/
Upload File:
Normally when uploading a file, the filebrowser upload screen appears with a timer to upload success, however when I try to upload a file it just refreshes the page with url ending
?_save=Upload
It is getting to the point where I will just remove the module because it isn't doing as it is set up to be.
Any ideas?
EDIT: I think the uploading files side of things is caused by the original file permissions also. If we fix this error then perhaps the upload will work too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在带有 apache 的服务器上使用它,则必须授予 apache 在此文件夹中写入的权限 (
chown
)。If you use it on a server with apache, then you must give apache right to write in this folder (
chown
).我有类似的事情。我向 www-data 用户授予了我想要上传到的文件夹的权限,并且它有效。
I had something similar. I gave permission to www-data user to the folder i wanted to upload to and it worked.