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']);
|
||||
$toExt = $_POST["submit"];
|
||||
$jobId = bin2hex(random_bytes(16));
|
||||
$targPat = "/var/www/uploads/$jobId/upload.$fromExt";
|
||||
|
||||
chdir('/var/www/uploads/');
|
||||
mkdir($jobId);
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"], $targPat);
|
||||
|
||||
chdir($jobId);
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"], "upload.$fromExt");
|
||||
|
||||
exec("ffmpeg -y -i upload.$fromExt output.$toExt");
|
||||
|
||||
header("Cache-Control: public");
|
||||
|
|
Loading…
Reference in a new issue