Version | 0.2 |
Built with | Django 1.5 - Python 2.7.3 |
Released with Django 1.5
It's easy:
- Copy the complete App[1] folder into your project folder
- Add the App to the INSTALLED_APPS
- Insert the path to the "template" directory in the "ajaxfilemanager" folder into your TEMPLATE_DIRS
- Add a URL-Rule to your urls.py in the django-site-root (Example: url(r^'ajaxfilemanager/', include('ajaxfilemanager.urls')), )
- Ensure that you activate 'staticfiles'
- Edit the 'settings.py' in the ajaxfilemanager directory and import YOUR global project settings.
Finish!
[1] Exactly called ajaxfilemanager and in this directory you find views.py, models.py, and urls.py
Serve to 'http://your.server.com/ajaxfilemanager'. You will be redirect to 'http://your.server.com/ajaxfilemanager/?path='. The Path Syntax in the URL is simple. Nothing is the ajaxfm_media_root. The rest is the original path. But if you enter ?path=/ you will be redirect to ajaxfilemanager/noroot and get a message like You are not root, please go back. because "/" is basically the root directory of your server. This has a technical reason of os.path.join
Currently you can access the uploader with "http://your.server.com/ajaxfilemanager/upload" this is still a security leak, because anyone can upload without have access to the filemanager.
- "Access denied" for direct usage of /upload.
- Authentication for access to ajaxfm
#API Documentation Ajaxfilemanager provides an API that you can access easily about the URL. First here are all function:
- New Folder: actions/newfolder/?path=pathWhereFolderPlacedIn&folder=folderName
- Remove File: actions/rmfile/?path=pathWhereFilePlacedIn&filename=fileName
- Remove Folder: actions/rmfolder/?path=pathWhereFolderPlacedIn&folder=folderName
- Move File: actions/mvfile/?path=pathWhereFilePlacedIn&filepath=pathWhereFileMoved&filename=fileName
- Move Folder: actions/mvfolder/?path=pathWhereFolderPlacedIn&folderpath=pathWhereFolderMoved&foldername=folderName
- Copy File: actions/cpfile/?path=pathWhereFilePlacedIn&filepath=pathWhereFileCopied&filename=fileName
- Copy Folder: actions/cpfolder/?path=pathWhereFolderPlacedIn&folderpath=pathWhereFolderCopied&foldername=folderName
- Rename File: actions/renamefile/?path=pathWhereFilePlacedIn&filenewname=newFileName&filename=fileName
- Rename Folder: actions/renamefolder/?path=pathWhereFolderPlacedIn&foldernewname=newFolderName&foldername=folderName
- Edit file: actions/editfile/ | POSTVars: path=pathToFile&content=FileContentToWrite