diff --git a/public_html/private/beam.php b/public_html/private/beam.php index 6a037c8..f8eb03e 100644 --- a/public_html/private/beam.php +++ b/public_html/private/beam.php @@ -21,12 +21,19 @@ switch (true) { case (empty($file_name) || empty($dest_name)): redirect(make_url("result/beam.php?error=1")); break; + case (file_exists($dest_file)): redirect(make_url("result/beam.php?error=2")); break; + case (move_uploaded_file($_FILES["uploadcoin"]["tmp_name"], $dest_file) && write_metadata($dest_file, $_POST["file_source"])): + + if (in_array(file_extension($dest_file)),array("jpg","jpeg")) { + sanitize_image($dest_file); + } + redirect(make_url("result/beam.php?success=" . $file_name)); break; diff --git a/resources/config.default.php b/resources/config.example.php similarity index 95% rename from resources/config.default.php rename to resources/config.example.php index 4d34a3b..d40c584 100644 --- a/resources/config.default.php +++ b/resources/config.example.php @@ -41,7 +41,7 @@ $file_beam_dir = "p/"; // where the files go // for sanitization of images (stripping EXIF, etc) with an external program. -$image_sanitize_command = "mogrify"; -$image_sanitize_args = "strip"; +$image_sanitize_command = "jhead"; +$image_sanitize_args = "-purejpg"; ?>