annotate trunk/scripts/aim-o-matic/aim-o-matic.php @ 706:f8e90b5d85fd
tip
Delete CARFAC code from this repository.
It has been moved to https://github.com/google/carfac
Please email me with your github username to get access.
I've also created a new mailing list to discuss CARFAC development:
https://groups.google.com/forum/#!forum/carfac-dev
author |
ronw@google.com |
date |
Thu, 18 Jul 2013 20:56:51 +0000 |
parents |
2e53a3b92525 |
children |
|
rev |
line source |
tom@520
|
1 <?php
|
tom@520
|
2 if ($_FILES["audio_file"]["size"] < 20000000 && $_FILES["config_file"]["size"] < 2000000) {
|
tom@520
|
3 if ($_FILES["audio_file"]["error"] > 0 || $_FILES["config_file"]["error"]) {
|
tom@520
|
4 echo "error: file upload failed";
|
tom@520
|
5 } else {
|
tom@520
|
6 $id_string = uniqid("aim-o-matic", true);
|
tom@520
|
7 $ext = pathinfo($_FILES["audio_file"]["name"], PATHINFO_EXTENSION);
|
tom@520
|
8 move_uploaded_file($_FILES["audio_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . "." . $ext);
|
tom@520
|
9 move_uploaded_file($_FILES["config_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . ".config");
|
tom@520
|
10 echo "Results will be avaiable shortly, here:<br>";
|
tom@520
|
11 echo "<a href='results/" . $id_string . "/'>" . $id_string . "</a>";
|
tom@520
|
12 }
|
tom@520
|
13 } else {
|
tom@520
|
14 echo "error: file too large";
|
tom@520
|
15 }
|
tom@520
|
16
|
tom@520
|
17 ?>
|