CMS  Version 3.9
save_svg.inc
Go to the documentation of this file.
1 <?php
2 
3 $image = $_POST["img"];
4 $filename = checkIdentifier($_POST["filename"]);
5 
6 trace($image, 3);
7 
8 $image = str_replace(array(";", ","), array(":", ":"), $image);
9 
10 list($protocol,$mimeType,$encoding,$data) = explode(":", $image);
11 
12 
13 if ($encoding == "base64")
14 {
15  $data = base64_decode($data);
16 }
17 
18 header("Pragma: private");
19 header("Content-Disposition: attachment;filename=\"{$filename}.svg\"");
20 header("Cache-Control: must-revalidate");
21 header("Content-Type: $mimeType");
22 echo $data;
23 ?>
$_POST["owner_id"]
Definition: blog_form.inc:54
$mimeType
Definition: download.inc:43
$filename
Definition: save_svg.inc:4
$image
Definition: save_svg.inc:3