From 1aee93aaa7ac3eb304ca086700e2b99af7044199 Mon Sep 17 00:00:00 2001 From: Madeleine Price Ball Date: Fri, 31 Aug 2012 10:48:10 -0400 Subject: [PATCH] Allow .csv upload This is needed to allow upload and processing of deCODEme_scan.csv files. --- public_html/genome_upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/genome_upload.php b/public_html/genome_upload.php index bbb4f9e..46a55fd 100644 --- a/public_html/genome_upload.php +++ b/public_html/genome_upload.php @@ -82,7 +82,7 @@ } elseif((!empty($_FILES["genotype"])) && ($_FILES['genotype']['error'] == 0)) { $filename = basename($_FILES['genotype']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); - if (($ext == "txt" || $ext == "gff" || $ext == "zip" || $ext == "gz" || $ext == "bz2") && ($_FILES["genotype"]["size"] < 524288000)) { + if (($ext == "txt" || $ext == "csv" || $ext == "gff" || $ext == "zip" || $ext == "gz" || $ext == "bz2") && ($_FILES["genotype"]["size"] < 524288000)) { $tempname = $_FILES['genotype']['tmp_name']; $shasum = sha1_file($tempname); $page_content .= "shasum is $shasum
"; @@ -114,7 +114,7 @@ $page_content .= "Error: A problem occurred during file upload!"; } } else { - $page_content .= "Error: Only .txt, .gff, .zip, .gz or .bz2 files under 500MB are accepted for upload"; + $page_content .= "Error: Only .txt, .csv, .gff, .zip, .gz or .bz2 files under 500MB are accepted for upload"; } } elseif (isset($_POST['location']) && $user && $user['oid']) { $location = preg_replace('{/\.\./}','',$_POST['location']); # No shenanigans