File Module
From ExtractValue Wiki
The File Module governs all actions related to uploading and viewing of files, particularly PDFs, documents, images, zips, and other items.
The file module may be able to utilize open source code from Elgg's Plugins/file repository.
Contents |
Business Description
Find, tag, upload--as simple as that. Organize relevant files for prospects, clients and employees; then help them find the right files through a search engine that even indexes the insides of Word documents and PDFs.
Objectives
All registered user to upload files to the system. The file will be marked with proper permission/privilege. Once uploaded, the file will display in the appropriate place for viewers with the right permission.
Associations
When a User uploads a file to any location, the file will be associated with the User and timestamped. This association will be displayed under the Activity Feed of the User.
Additional associates will be displayed on their relevant pages. For example, if a file is uploaded to a Group, then the file will be displayed on the Group profile (subject to Privacy Permissions, of course).
Association Matrix
| User profile | Group profile | Product profile | |
| User file | X | ||
| Group file | X | ||
| Product file | X | X |
User Files
When file is associated with users, the file will be available when the viewer is looking at the user's profile, subject to the assigned permission.
Group Files
When file is associated with groups, the file will be available when the viewer is looking at the group's profile, subject to the assigned permission.
Product Files
When file is associated with products, the file will be available when the viewer is looking at the product's profile The information will be available with associated group profile as well.
Process Flow
Input
- User clicks link to upload file to the system
- User is presented with an input screen
- Text field for manual entry of file location
- Browse to click-n-select file
- Radio selection for file type
- Radio selection for permission
- Depending on selection, maybe present another list of user or other choices
- Submit button to indicate everything is done
- User make appropriate selection and click on submit
- System validate the input before actual submission ( advance )
- Data is submitted through POST method to a controller/web service
- A status screen is displayed to the user indicating upload status
Output
- User navigate to one of the following: User profile, Group profile, Product profile
- System using the #Association to determine what is shown
- User view and possibly download the displayed file(s)
Technical Spec
- The module should be user friendly and problem free in majority of the available browsers
- The minimum required will be IE6 + IE7 + FF2 + FF3 + Safari + Chrome
- All information about the file should be gathered in a user friendly style
- A file upload place
- Text field for manual typing of the file location
- Browse button for click-selection of the file location
- A file type selection
- Radio button for selection between ( User, Group, Product )
- A permission selection
- Radio selection
- Private
- Restricted
- User list for click/unclick of inclusion
- Group list for click/unclick of inclusion
- Limited
- Group type list for click/unclick of inclusion
- Public
- Radio selection
- Form fields
| Form field names and functions | |
| Name | Function |
| form_url | Processor (server) url |
| form_success | URL to be redirected when successful (can process GET values) |
| form_fail | URL to be redirected when failed in processing (can process GET values) |
| form_step | Reserved |
| MAX_FILE_SIZE | The maximum upload file size |
| form_dummy | A special field for quick spam filter |
| form_count | The number of uploading file(s) |
| form_filename<#> | The actual uploading file name |
| form_type_user<#> | The file type { user, group, product } |
| form_input_permission<#> | The file permission value { private, restricted, limited, public } |
| form_input_restricted<#> | The actual value of selection for restricted access such as user name list |
| form_upload | T/F which represent the submit button |
- HTML/JavaScript code
- Most features can be simple HTML, but JavaScript should be used when possible to increase usability
- On page validation where possible and appropriate
- Submission of the information with POST to a configurable URL
- The naming of fields should be easily configurable, and the default should make logically sense with hint of namespace
Related Links
Status
Front-end ( HTML/AJAX )
...
Back-end ( Processor/Server )
0.5.0 - basic functions ( need to normalize the form field names )
Installation / Usage
- General
- Upload directory should be created with proper permission
- Kohana module will use Configuration file to determine the upload directory
- Upload directory will be root of all files uploaded, actual files are stored in sub-directories of the Root, so each folder won't contain too many files
- Group files
- Group information must be created in the group table already
- Valid group ID is ready to be linked as an owner ID
