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.
我正在尝试将django文件浏览器应用到我最新的应用程序中。我也安装了grappelli。url可以很好地进入文件浏览器/管理/文件浏览器/浏览是我设置的。
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/
1月18日08:32上传/上传
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
通常在上传文件时,filebrowser上传屏幕会显示一个计时器来成功上传文件,但是当我尝试上传文件时,它只会刷新页面,并以url结尾
?_save=Upload
? _save =上传
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.
编辑:我认为上传文件方面的事情也是由原来的文件权限造成的。如果我们修复了这个错误,那么上传可能也会成功。
2 个解决方案
#1
1
If you use it on a server with apache, then you must give apache right to write in this folder (chown
).
如果您在使用apache的服务器上使用它,那么您必须赋予apache在此文件夹(chown)中写入的权利。
#2
1
I had something similar. I gave permission to www-data user to the folder i wanted to upload to and it worked.
我有类似的东西。我允许www-data用户上传我想要上传的文件夹,它成功了。
#1
1
If you use it on a server with apache, then you must give apache right to write in this folder (chown
).
如果您在使用apache的服务器上使用它,那么您必须赋予apache在此文件夹(chown)中写入的权利。
#2
1
I had something similar. I gave permission to www-data user to the folder i wanted to upload to and it worked.
我有类似的东西。我允许www-data用户上传我想要上传的文件夹,它成功了。