Upload Unsuccessful!";
}
else{
// $result_msg = 'The URL '.$_POST['upload_url'].' was downloaded successfuly. Please remember to click the save button.';
$result_msg = "Successful upload!" ;
$operationSuccess = "true";
}
include_once("RCCWP_WritePostPage.php") ;
$edit_anchor = RCCWP_WritePostPage::snipshot_anchor(FLUTTER_URI.'files_flutter/'.$filename) ;
echo $result_msg."*".$filename."*".$edit_anchor ;
}
if( isset($_FILES['Filedata'] ) )
{
if ($_FILES['Filedata']['error'] == UPLOAD_ERR_OK) // no error
{
$special_chars = array (' ','`','"','\'','\\','/'," ","#","$","%","^","&","*","!","~","‘","\"","’","'","=","?","/","[","]","(",")","|","<",">",";","\\",",");
$filename = str_replace($special_chars,'',$_FILES['Filedata']['name']);
$filename = time() . $filename;
@move_uploaded_file( $_FILES['Filedata']['tmp_name'], dirname(__FILE__) . '/files_flutter/' . $filename );
@chmod(dirname(__FILE__) . '/files_flutter/' . $filename, 0644);
// $result_msg = 'The file '.$_FILES['Filedata']['name'].' was uploaded successfuly. Please remember to click the save button.';
$result_msg = "Successful upload!" ;
$operationSuccess = "true";
}
elseif ($_FILES['Filedata']['error'] == UPLOAD_ERR_INI_SIZE)
$result_msg = 'The uploaded file exceeds the maximum upload limit';
else
$result_msg = "Upload Unsuccessful!";
include_once("RCCWP_WritePostPage.php") ;
$edit_anchor = RCCWP_WritePostPage::snipshot_anchor(FLUTTER_URI.'files_flutter/'.$filename) ;
echo $result_msg."*".$filename."*".$edit_anchor ;
}
/*
if( isset($_FILES['Filedata'] ) )
{
$path = dirname(__FILE__) . '/files_flutter/';
$path = $path . basename( $_FILES['Filedata']['name'] );
if( move_uploaded_file($_FILES['Filedata']['tmp_name'], $path) )
{
echo 'The file was uploaded successfuly. Please remember to click the save button.'.$_FILES['Filedata']['name'] ;
}
else
{
echo $_FILES[0]['error'] ;
}
}*/
?>