Remove subdomain file serving support
This commit is contained in:
parent
57cf11a558
commit
274042d17d
|
@ -3,10 +3,6 @@
|
||||||
define("CONFIG_SITE_NAME", "Uguu");
|
define("CONFIG_SITE_NAME", "Uguu");
|
||||||
//Site root URL
|
//Site root URL
|
||||||
define("CONFIG_ROOT_URL", "http://path.to.uguu");
|
define("CONFIG_ROOT_URL", "http://path.to.uguu");
|
||||||
//Enable this if you use a subdomain for serving uploaded files
|
|
||||||
define("CONFIG_SUBUPLOAD_URL_ENABLED", "false");
|
|
||||||
//Only define this if the above is set to true
|
|
||||||
define("CONFIG_SUBUPLOAD_URL", "http://a.uguu.se");
|
|
||||||
//Path to uploaded files
|
//Path to uploaded files
|
||||||
define("CONFIG_FILES_PATH", "/path/to/uguu/public/files/");
|
define("CONFIG_FILES_PATH", "/path/to/uguu/public/files/");
|
||||||
//Path to Uguu's files
|
//Path to Uguu's files
|
||||||
|
|
|
@ -45,12 +45,7 @@ function save_file ($file, $name, $arg, $type){
|
||||||
move_uploaded_file($file,CONFIG_FILES_PATH.$file_name);
|
move_uploaded_file($file,CONFIG_FILES_PATH.$file_name);
|
||||||
//Check if html or plain text should be returned
|
//Check if html or plain text should be returned
|
||||||
if($type==='tool'){
|
if($type==='tool'){
|
||||||
//Return url+filename to the user (plain text)
|
echo CONFIG_ROOT_URL.'/'.urlencode($file_name);
|
||||||
if(CONFIG_SUBUPLOAD_URL_ENABLED == "true"){
|
|
||||||
echo CONFIG_SUBUPLOAD_URL.'/'.urlencode($file_name);
|
|
||||||
}else{
|
|
||||||
echo CONFIG_ROOT_URL.'/files/'.urlencode($file_name);
|
|
||||||
}
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}elseif($type==='normal'){
|
}elseif($type==='normal'){
|
||||||
//Return url+filename to the user (HTML)
|
//Return url+filename to the user (HTML)
|
||||||
|
|
|
@ -7,11 +7,7 @@ $tpl = new RainTPL;
|
||||||
$title = "Temp File Hosting";
|
$title = "Temp File Hosting";
|
||||||
$tpl->assign("title", $title);
|
$tpl->assign("title", $title);
|
||||||
$tpl->draw("header");
|
$tpl->draw("header");
|
||||||
if(CONFIG_SUBUPLOAD_URL_ENABLED == 'true'){
|
$tpl->assign("url_filename", CONFIG_ROOT_URL.'/'.$n);
|
||||||
$tpl->assign("url_filename", CONFIG_SUBUPLOAD_URL.'/'.$n);
|
|
||||||
}else{
|
|
||||||
$tpl->assign("url_filename", CONFIG_ROOT_URL.'/'.$n);
|
|
||||||
}
|
|
||||||
$tpl->assign("retention_time", CONFIG_MAX_RETENTION_TEXT);
|
$tpl->assign("retention_time", CONFIG_MAX_RETENTION_TEXT);
|
||||||
$tpl->draw("upload-done");
|
$tpl->draw("upload-done");
|
||||||
$tpl->draw("footer");
|
$tpl->draw("footer");
|
||||||
|
|
Loading…
Reference in New Issue