FrancisBaileyH / Uploadr

Simple PHP/Ajax Upload Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Uploadr is a simple AJAX/PHP file uploader. I made it as an application for personal use and practice. You can view a live demo over at http://demo.francisbailey.com

Installation

Installation is fairly simple. You can just download the application and point your web root to public_html.
From there you'll need to change the document root in index.php

/* Index.php */
<?php

session_start();

/*
  * Simply change /path/to/app to the application direcory
  * I.e. /home/user/Uploadr/
*/
define('__DOC_ROOT', '/path/to/app/');


include(__DOC_ROOT.'System/autoload.php');
include(__DOC_ROOT.'Application/Config/config.php');


define('__UPLOAD_DIR', __DOC_ROOT.$config['upload_dir']);


$registry = new System\Registry();
$registry->config = $config;
$registry->csrf = new Lib\CSRF\CSRF_Protect();
$router = new System\Routing\Router($registry);
$router->loader();

?>

By default config.php (located in Application/Config/ ) points all uploads to the Uploads directory included in the app and outside of webroot. You can change the directory at any time, just ensure, for security purposes, that it's outside of your web root.

TroubleShooting

You need to make sure the Uploads directory, or whichever directory you choose to store your uploads, has sufficient permissions to write and read files.

About

Simple PHP/Ajax Upload Application


Languages

Language:PHP 67.0%Language:CSS 17.6%Language:JavaScript 15.4%