<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}
	global $_CONF;


	switch ($_GET["upload-action"]) {
		case "image-upload":
			External::Load("fileupload");
			//validate session
			$upload_handler = new UploadHandler(
				array(
			        'upload_dir' => "../upload/tmp/",
			        'upload_url' => $_CONF["url"] . "/upload/tmp/",
				)			
			);
			die();
			
		break;

		case "file-upload":
			External::Load("fileupload");
			$upload_handler = new UploadHandler(
				array(
			        'upload_dir' => "../upload/tmp/",
			        'upload_url' => $_CONF["url"] . "/upload/tmp/",
				)							
			);

			die();
		break;
	}
	

?>