File Submitter: Cris D.
File Submitted: 9 Jan 2008
File Updated: 22 Jan 2008
File Category: Miscellaneous
Document Upload form
Snippet by Cris D.
Date: 2008/01/09
Use: allows etomite users to upload all kinds of files with extentions that you set without access to the manager backend. Can be used for uploading avatars, pictures, documents, movies, songs etc...
Place this snippet in a page where you want the upload form to appear.
- Optional parameters that can be set in the snippet call:
- The upload folder name.
- File extentions allowed.
- The maximum file size.
- The maximum width and height of images.
- Whether you allow images to be uploaded. 1 || 0
- The type of authentication required: NULL || simple || roles
This is an example of a snippet cal using many parameters:
[[upload_form?uploaddir=assets/uploads&allowed_ext=jpg,bmp,png&max_size=80000&perms=roles&roles=1,2,3]]
Notes: This snippet attempts to create to folder name that you set but due to some server settings, this
may have to be done manually and CHMOD to 0777. This has been tested on Windows and Linux servers.
All language messages are abstracted out ready for translation and the form is in a chunk-style format for easy editing and markup.
**Please be aware that there are security issues regarding allowing users to upload file types like exe, txt, php and other types of files that allow hackers to run scripts on your server. If this is news to you, perhaps you should read up on security first!**
CHANGELOG:
2008/1/22
*Fixed an error in permissions logic where access was blocked inadvertently for all permissions.
Click here to download this file












