relative file paths
This commit is contained in:
parent
f2dc81f477
commit
d81b69a2f1
1 changed files with 2 additions and 3 deletions
|
@ -3,13 +3,12 @@
|
||||||
$fromExt = strtolower(pathinfo($_FILES["file"]["name"])['extension']);
|
$fromExt = strtolower(pathinfo($_FILES["file"]["name"])['extension']);
|
||||||
$toExt = $_POST["submit"];
|
$toExt = $_POST["submit"];
|
||||||
$jobId = bin2hex(random_bytes(16));
|
$jobId = bin2hex(random_bytes(16));
|
||||||
$targPat = "/var/www/uploads/$jobId/upload.$fromExt";
|
|
||||||
|
|
||||||
chdir('/var/www/uploads/');
|
chdir('/var/www/uploads/');
|
||||||
mkdir($jobId);
|
mkdir($jobId);
|
||||||
move_uploaded_file($_FILES["file"]["tmp_name"], $targPat);
|
|
||||||
|
|
||||||
chdir($jobId);
|
chdir($jobId);
|
||||||
|
move_uploaded_file($_FILES["file"]["tmp_name"], "upload.$fromExt");
|
||||||
|
|
||||||
exec("ffmpeg -y -i upload.$fromExt output.$toExt");
|
exec("ffmpeg -y -i upload.$fromExt output.$toExt");
|
||||||
|
|
||||||
header("Cache-Control: public");
|
header("Cache-Control: public");
|
||||||
|
|
Loading…
Reference in a new issue