Remove Unneeded PHP files
We don't use these, so there's no point in having them in our bundled SVG-Edit.
This commit is contained in:
parent
b3aae9b06d
commit
4576a7f7df
2 changed files with 0 additions and 75 deletions
|
@ -1,31 +0,0 @@
|
|||
<!doctype html>
|
||||
<?php
|
||||
/*
|
||||
* fileopen.php
|
||||
* To be used with ext-server_opensave.js for SVG-edit
|
||||
*
|
||||
* Licensed under the Apache License, Version 2
|
||||
*
|
||||
* Copyright(c) 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
// Very minimal PHP file, all we do is Base64 encode the uploaded file and
|
||||
// return it to the editor
|
||||
|
||||
$file = $_FILES['svg_file']['tmp_name'];
|
||||
|
||||
$output = file_get_contents($file);
|
||||
|
||||
$type = $_REQUEST['type'];
|
||||
|
||||
$prefix = '';
|
||||
|
||||
// Make Data URL prefix for import image
|
||||
if($type == 'import_img') {
|
||||
$info = getimagesize($file);
|
||||
$prefix = 'data:' . $info['mime'] . ';base64,';
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
window.top.window.svgEditor.processFile("<?php echo $prefix . base64_encode($output); ?>", "<?php echo $type ?>");
|
||||
</script>
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* filesave.php
|
||||
* To be used with ext-server_opensave.js for SVG-edit
|
||||
*
|
||||
* Licensed under the Apache License, Version 2
|
||||
*
|
||||
* Copyright(c) 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
if(!isset($_POST['output_svg']) && !isset($_POST['output_png'])) {
|
||||
die('post fail');
|
||||
}
|
||||
|
||||
$file = '';
|
||||
|
||||
$suffix = isset($_POST['output_svg'])?'.svg':'.png';
|
||||
|
||||
if(isset($_POST['filename']) && strlen($_POST['filename']) > 0) {
|
||||
$file = $_POST['filename'] . $suffix;
|
||||
} else {
|
||||
$file = 'image' . $suffix;
|
||||
}
|
||||
|
||||
if($suffix == '.svg') {
|
||||
$mime = 'image/svg+xml';
|
||||
$contents = rawurldecode($_POST['output_svg']);
|
||||
} else {
|
||||
$mime = 'image/png';
|
||||
$contents = $_POST['output_png'];
|
||||
$pos = (strpos($contents, 'base64,') + 7);
|
||||
$contents = base64_decode(substr($contents, $pos));
|
||||
}
|
||||
|
||||
header("Cache-Control: public");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Disposition: attachment; filename=" . $file);
|
||||
header("Content-Type: " . $mime);
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
|
||||
echo $contents;
|
||||
|
||||
?>
|
Loading…
Reference in a new issue