Skip to content

Commit

Permalink
Allow .csv upload
Browse files Browse the repository at this point in the history
This is needed to allow upload and processing of deCODEme_scan.csv
files.
  • Loading branch information
Madeleine Price Ball committed Aug 31, 2012
1 parent 5d93119 commit 1aee93a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public_html/genome_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<br>";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1aee93a

Please sign in to comment.