Installation Guide

Mark Feltner edited this page Jan 8, 2015 · 15 revisions
Clone this wiki locally

Installation Guide

  1. Ensure your web server has PHP 5.3 (or newer) installed
  2. Download the install ZIP
  3. Extract and copy the contents of the ZIP (be sure to include .htaccess files which may be hidden by your file browser!) to your hosting web root (i.e., ~/fineuploader/php.fineuploader.com/). Installing into a subdirectory is also OK.
  4. Visit the page in your browser and see your new uploads page ready for user consumption.
  5. Visit /admin in your browser and enter the default username and password (user: admin, password: changeit) to secure the site.
  6. Enjoy!

Upload Mode

FineUploader PHP has two upload modes: allow anyone to upload or requiring all users to login. Anonymous upload is enabled by default; to change view the Configuration tab in the Admin panel.

When anonymous access is disabled, users will be redirected to the login page for authentication and then returned to the upload page.

Theming and Look and Feel

FineUploader PHP's front-facing upload page is designed to be easily styled and themed to your liking using, simply, HTML and CSS. All themes are located in the ./themes folder in the root directory. Widen have provided 3 base themes for getting started: default, minimal, and skeleton.

Creating your own theme is easy! Just copy one of the starter theme folders into a new folder in the same directory and give it a new name, say "awesome-theme" or something. From there you can the styles and layout of anything inside of the index.php file inside of that directory. Feel free to include your own assets or anything!

When editing your theme's index.php file be sure NOT TO TOUCH THE LINES OF CODE IN BETWEEN THE areas saying <!-- DO NOT TOUCH BELOW --> or <!-- DO NOT TOUCH ABOVE -->. The code in between these comments is not meant to be edited.

The theme page is just a regular PHP page, and thus can be used to assist with styling as needed. When linking to theme assets (JS, CSS, images) use a relative path prefixed with the PHP snippet <?php echo $assets ?>. For example: <?php echo $assets ?>/css/bootstrap.min.css">

Finally, goto the admin center (/admin), and visit the Site Settings page. From here, you can select from the current installed themes, including the one you just created.

Site Configuration Options

Site configuration options are exposed via the options variable. Use this snippet to access them and include them in your page: <?php echo $options['site_name'] ?>

Current options are:

  • site_name Name of site (entered on options page)
  • theme_name Name of current theme
  • anon_access True if anonymous uploading is enabled
  • directory Path where uploaded files will be written
  • keyFormat Format of generated directory and filename path

Customizing FineUploader configuration

The most common FineUploader options are configurable via the Configuration tab. Custom configuration is possible by editing the file /config/uploader.yaml

Custom Form Fields

Your theme may contain any number of form fields. This allows you to capture additional information from users using standard HTML form elements including select lists, radio buttons, text fields, etc.

Custom fields should use the naming convention of user[] with your field name inside the brackets. For example, for a text field named widget_type use the html <input type='text' name='user[widget_type]'>. Custom form fields will be sent to server and are written into a separate text file ending with _metadata.yaml. Values also appear in the Admin file browser page.

For required fields we recommend that you simply use the HTML5 required attribute. All modern browsers will correctly suppress form submission until a value is entered. For more robust validation support, consider using a jQuery plugin.

Included Themes

default This theme includes Twitter Bootstrap, jQuery, and a custom Fine Uploader template with CSS classes for looking nice with the default Bootstrap styles.

skeleton This theme includes the Skeleton CSS Framework, jQuery, and a custom Fine Uploader template with CSS classes for looking nice with the Skeleton styles. Choose this if you want to have solid CSS foundation and the customizability offered from a minimalist library.

minimal This theme includes jQuery and a custom Fine Uploader template. Choose this if you want full control over the theme and style of your page.

Plugins

FineUploader PHP has alpha support for user-extensible plugins.

  • User authentication source
  • File upload lifecycle

Please contact us if you have a use case.