File Submitter: Cris D.
File Submitted: 27 Jan 2008
File Updated: 27 Jan 2008
File Category: Security
This snippet is based on the snippet uploadForm by Cris D and ShowFiles snippet by Ralph. Although similar to the upload form, this snippet is basically a whole module that requires little configuration to get it working.
It allows admin to set a folder, for uploading while controlling the filename, filetypes, file size, and custom messages. Uploaded files are instantly listed underneath the upload form as they are uploaded with a href link to download or (if logged in- delete) them.
Permissions are set to NULL on installation by default, make sure you either authenticate the page or set perms=simple or perms=roles depending on your required security settings on your site.
An example of many of the parameters used in a snippet call:
&uploadDescription= your pdf files.
&blockedMessage=Log in to upload files.
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.
The snippet is configured to allow multiple upload forms and file lests per page.
All uploads are stored in the upload folder and all upload info stored in a dedicated table including:
upload user id, type of file, folder where stored, filename, file extention, timestamp.
Files can also be deleted from the same window: if logged in, a "delete" button appears beside the file and when deleted, deletes the corresponding row from the table as well as the file.
See in action here:
Click here to download this file
Edited by Ralph, 27 January 2008 - 03:28 PM.
modified snippet call formatting for better presentation