File Module

From ExtractValue Wiki

Jump to: navigation, search

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

  1. User clicks link to upload file to the system
  2. User is presented with an input screen
    1. Text field for manual entry of file location
    2. Browse to click-n-select file
    3. Radio selection for file type
    4. Radio selection for permission
      1. Depending on selection, maybe present another list of user or other choices
    5. Submit button to indicate everything is done
  3. User make appropriate selection and click on submit
  4. System validate the input before actual submission ( advance )
  5. Data is submitted through POST method to a controller/web service
  6. A status screen is displayed to the user indicating upload status

Output

  1. User navigate to one of the following: User profile, Group profile, Product profile
  2. System using the #Association to determine what is shown
  3. 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
  1. The minimum required will be IE6 + IE7 + FF2 + FF3 + Safari + Chrome
  • All information about the file should be gathered in a user friendly style
  1. A file upload place
    1. Text field for manual typing of the file location
    2. Browse button for click-selection of the file location
  2. A file type selection
    1. Radio button for selection between ( User, Group, Product )
  3. A permission selection
    1. Radio selection
      1. Private
      2. Restricted
        1. User list for click/unclick of inclusion
        2. Group list for click/unclick of inclusion
      3. Limited
        1. Group type list for click/unclick of inclusion
      4. Public
  • 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
  1. Most features can be simple HTML, but JavaScript should be used when possible to increase usability
  2. On page validation where possible and appropriate
  3. Submission of the information with POST to a configurable URL
  4. 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

  1. General
    1. Upload directory should be created with proper permission
    2. Kohana module will use Configuration file to determine the upload directory
      1. 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
  2. Group files
    1. Group information must be created in the group table already
    2. Valid group ID is ready to be linked as an owner ID

Category Tree

Personal tools