From 8373023f1c2621a8c7c66269e69b000027d304e6 Mon Sep 17 00:00:00 2001 From: Jaidyn Lev Date: Sat, 7 Apr 2018 21:15:07 -0500 Subject: [PATCH] Added URL-display on file-submit page --- beam.php | 2 -- lib.php | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/beam.php b/beam.php index 10c948d..13332bd 100644 --- a/beam.php +++ b/beam.php @@ -19,8 +19,6 @@ if (!empty($_POST["desired_filename"])) PATHINFO_EXTENSION)); } - echo($file_name); - $beaming_permitted = 0; } else if (!empty($_FILES["fileToUpload"]["name"])) diff --git a/lib.php b/lib.php index 2f8e364..00e408a 100644 --- a/lib.php +++ b/lib.php @@ -88,6 +88,25 @@ function url_to_filename($url) return $filename; } +function get_cwd($url) +{ + $url_array = (explode("/", $url)); + + if (end($url_array)) + { + $parts = count($url_array); + + $url = implode(array_splice($url_array, 1, $parts - 2)); + + return $url; + } + else + { + return $url; + } +} + + function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data = false) { @@ -100,6 +119,7 @@ function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data =

Your 's over here

+